qt自定义标题栏和边框_在Windows 7中自定义标题栏和其他系统字体

本文介绍了如何在Windows 7系统中个性化标题栏和菜单字体,通过进入个性化设置,调整窗口颜色,选择高级外观设置,从而改变窗口边框和标题栏的字体、大小和颜色,实现界面的定制。此外,还可以调整其他UI部分,如文件菜单字体,以达到理想的视觉效果。
摘要由CSDN通过智能技术生成
qt自定义标题栏和边框

qt自定义标题栏和边框

Would you like to tweak your title bar and menu fonts in Windows 7?  Here’s how you can change those little settings you may have enjoyed tweaking in older versions of Windows.

您想在Windows 7中调整标题栏和菜单字体吗? 您可以通过以下方法更改在旧版Windows中可能会喜欢的一些小设置。

Sometimes it can be nice to really make your computer fully personalized.  Back in the ‘90’s, many of use enjoyed customizing Windows 95 and 98’s themes with colors, fonts, and more.  These features are actually still in Windows 7, albeit slightly more hidden.  Here’s how to change them.

有时,真正使您的计算机完全个性化可能会很不错。 上世纪90年代,许多用户喜欢使用颜色,字体等自定义Windows 95和98的主题。 这些功能实际上仍在Windows 7中,尽管稍微隐藏了一些。 更改方法如下。

Right-click on your desktop, and select Personalize as you would to change your Aero theme.

右键单击桌面,然后选择“ 个性化”,就像您要更改Aero主题一样。

sshot-2010-09-18-[1]

In the Personalization pane, click Window Color under the theme lists.

在“个性化”窗格中,单击主题列表下的“ 窗口颜色 ”。

sshot-2010-09-18-[4]

Under the color options, click the Advanced appearance settings link.

在颜色选项下,单击“ 高级外观设置”链接。

sshot-2010-09-18-[5]

This will open an Appearance dialog that looks like the one you may have been used to using with Windows 98 or 2000.  In the preview box at the top, click the element you wish to tweak.  Here we’re selecting the top window boarder on the message box since we want to change the font on the window title bar.

这将打开一个“外观”对话框,看起来就像您曾经在Windows 98或2000上使用过的对话框。在顶部的预览框中,单击要调整的元素。 在这里,我们要在消息框中选择顶部的窗口边界,因为我们想更改窗口标题栏上的字体。

sshot-2010-09-18-[6]

Now pick the font, size, color, and more for the area you selected.  You’ll immediately see the preview in the top box.  If you want to change fonts or more in other parts of your theme, simply select them and change as you wish.  Note that the colors for the elements themselves, such as the blue in the active title bar here, will not show up unless you switch to the Windows Classic theme.

现在,为您选择的区域选择字体,大小,颜色等。 您会立即在顶部框中看到预览。 如果要在主题的其他部分更改字体或更多字体,只需选择它们并根据需要进行更改。 请注意,除非切换到Windows Classic主题,否则不会显示元素本身的颜色,例如此处活动标题栏中的蓝色。

Once you’re done, click Ok to apply the settings.

完成后,单击“ 确定”以应用设置。

sshot-2010-09-18-[7]

Your screen will dim momentarily as Windows applies the theme changes.

当Windows应用主题更改时,屏幕将短暂变暗。

sshot-2010-09-18-[8]

Moments later, you’ll see your new font style on your window borders.  If you chose a larger font than the Windows standard, your window border and buttons will be larger also.

片刻之后,您将在窗口边框上看到新的字体样式。 如果您选择比Windows标准更大的字体,则窗口边框和按钮也将更大。

sshot-2010-09-18-[9]

Alternately, if you choose a smaller font or font size, your window buttons will shrink.  Feel free to play with it until it looks perfect to you!

或者,如果选择较小的字体或字体大小,则窗口按钮将缩小。 随意使用它,直到对您而言完美为止!

sshot-2010-09-18-[10]

You can continue your tweaking with other parts of the UI, such as the file menu font.  Here notice that we have Segoe Script in the file menu, along with our customized window border font.

您可以继续对UI的其他部分进行调整,例如文件菜单字体。 在这里请注意,我们在文件菜单中有Segoe Script,以及自定义的窗口边框字体。

image

Here’s our new right-click menu with Segoe Script font; when you change the file menu font, the right-click menus change the same.

这是我们使用Segoe Script字体的新右键菜单; 当您更改文件菜单字体时,右键菜单也会更改。

image

If you’d like to go back to your original settings, you can change the fonts back by hand as before, or just select one of the other themes in the Personalization pane to revert to the default settings.

如果您想返回到原始设置,则可以像以前一样手动更改字体,或者只需在“ 个性化”窗格中选择其他主题之一即可恢复为默认设置。

image

If you’d like to do more with themes in Windows 7, here’s some articles you might want to check out:

如果您想在Windows 7中使用更多主题,可以参考以下文章:

Create a New Theme Pack From Scratch

从头开始创建新的主题包

Access Hidden Regional Themes in Windows 7

在Windows 7中访问隐藏的区域主题

Get Wallpapers from Windows 7 Theme Packs Without Installing the Theme

从Windows 7主题包获取墙纸而无需安装主题

翻译自: https://www.howtogeek.com/howto/29244/customize-the-title-bar-and-other-system-fonts-in-windows-7/

qt自定义标题栏和边框

Qt是一个功能强大的跨平台C++框架,可以用来开发图形用户界面应用程序。在Qt,我们可以自定义应用程序的标题栏边框自定义标题栏通常需要采用以下步骤来实现: 1. 使用Qt的窗口样式表(QSS)来定义标题栏的外观。我们可以设置标题栏的背景颜色、字体边框等属性,可以自定义按钮的样式、位置和功能等。 2. 使用Qt的信号和槽机制来处理标题栏按钮的点击事件。通过连接按钮的clicked()信号到我们自定义的槽函数,我们可以实现关闭、最小化、最大化等按钮的功能。 3. 在窗口的构造函数去掉自带的标题栏。我们可以使用setWindowFlags()函数来设置窗口的属性,将窗口的标题栏隐藏掉。 自定义边框通常需要采用以下步骤来实现: 1. 设置窗口的边框样式。我们可以使用setStyleSheet()函数来设置窗口的外观,包括边框颜色、线条粗细等。 2. 自定义边框的绘制。我们可以使用Qt的绘图功能来绘制窗口的边框,可以通过重写窗口的paintEvent()函数,在窗口绘制时添加绘制边框的代码。 3. 处理边框的拖动事件。我们可以重写窗口的mousePressEvent()、mouseMoveEvent()和mouseReleaseEvent()函数,实现窗口的拖动功能。 总之,Qt提供了丰富的功能和灵活的API来自定义应用程序的标题栏边框。开发者可以根据自己的需求来定制应用程序的外观,使其更加个性化和美观。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值