制作全屏 GUI 时调整显示器分辨率的典型方法是什么?

发布于 2024-09-26 18:12:09 字数 74 浏览 0 评论 0原文

我正在制作一个程序,该程序将有一个必须固定大小的小部件,是否有最小分辨率宽度的行业标准?

处理这个问题有哪些常见方法?

I'm making a program that will have a widget that has to be fixed in size, is there an industry standard for smallest resolution width?

What are some common way of dealing with this problem?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

箹锭⒈辈孓 2024-10-03 18:12:09

在传统 PC 上(即没有移动设备、没有“定制”、没有专用硬件),您通常找不到结果低于 640x800x256 的显示器,因此这是“技术”事实上的标准。

但是,如果您尝试针对该分辨率进行设计,您的控件将看起来丑陋且设计不经济,浪费了现实世界平台上的大量可用空间。

我想说 800x600x16 绝对是最低要求。即使 Windows 保存模式通常也能够提供(或可以切换到)800x600。因此,我通常设计可调整大小的应用程序为 800x600,如果做得正确,即使在最大的分辨率下,它们的外观和行为也很棒。相比之下,如果您设计一个可调整大小的 640x480 应用程序,由于可用空间有限,并且“没有人”在现实世界中使用该分辨率,您将在布局等方面做出大量妥协。

此外,我喜欢智能调整大小的应用程序。根据您的 GUI 框架/工具包,您可以轻松或不容易满足这一要求。不过,值得这么麻烦。

您还可以考虑字体缩放设置。在大分辨率显示器上,许多用户更喜欢“大字体”设置,或者与原始字体缩放设置不同的其他设置。然后,您的应用程序必须相应地扩展,最小分辨率标准变得不那么重要,而应用程序智能调整大小的能力则变得更加重要。

简而言之:
a) 800x600x16 设计
a.1) 如果分辨率小于该分辨率,让您的应用程序终止并显示错误消息
b) 确保所有可调整大小的对话框都能智能调整大小
c) 在大字体和小字体缩放设置上测试所有布局
d) 当说“800x600”时,这是没有用的,因为您的应用程序通常无法使用整个屏幕,即使最大化也是如此。 (我们不是在谈论全屏应用程序,对吗?)因此,您应该考虑任务栏和可能无法被普通窗口使用的其他固定屏幕元素,以及最大化时窗口的标题栏。在所有情况下,您都希望窗口适合桌面区域。 (好吧,也许你会。)Windows 可以告诉你该区域的尺寸,考虑到用户可能碰巧使用的所有任务栏等内容,因此如果可用空间小于你的最小分辨率,你可以发出警报/中止你设计的目的。

On traditional PCs (i.e. no mobile, no "custom", no specialized hardware) You usually will not find a display with a resultion below 640x800x256, so that is the "technical" de-facto standard.

However, if you try to design for that resolution, your controls will look ugly and uneconomically designed, wasting lots of available space on real-world platforms.

I'd say 800x600x16 is an absolute minimum requirement. Even windows save mode usually is able to come up with (or can be switched to) 800x600. So I usually design resizeable apps for 800x600, and if done right, they look and behave great under even the largest resolutions. In contrast, if you design a resizeable app for 640x480, you will make an awful lot of compromises in layouting etc. due to the limited space available, and that while "nobody" uses that resolution in the real world.

Furthermore, I love applications that resize intelligently. Depending on your GUI framework/toolkit, that is a requirement that you can be met easily, or not-so-easily. It's worth the hassle, though.

You might also consider the font scaling setting. On large-resolution displays, many users prefer the "large fonts" setting, or something else different from the original font scaling setting. Then, your app must scale accordingly, and the minimum resolution criterium gets less important, while the apps's ability to re-size intelligently gains much more significance.

In short:
a) Design for 800x600x16
a.1) Let your app terminate with an error message if the resolution is smaller than that
b) Make sure all resizeable dialogs resize intelligently
c) Test all layouts on large and small font scaling settings as well
d) When saying "800x600", this is useless, since your app usually cannot use the whole screen, even if maximized. (We are not talking about fullscreen apps, do we?) So you should account for the task bar and possibly other fixed screen elements that cannot be used by a normal Window, and for the window's title bar when maximized. You will want the window to fit into the desktop area in all cases. (Well, maybe you will.) Windows can tell you the dimensions of that area, taking account all task bar etc. stuff that the user might happen to use, so you could alert/abort if the usable space is smaller than your minimum resolution that you designed for.

〆凄凉。 2024-10-03 18:12:09

对于 PC(不包括手机、手表、mp3 播放器、洗衣机等嵌入式设备),最小分辨率是 640x480,也称为 VGA 分辨率。

可能有一些 PC 级计算机,例如早期的 MacAtarisTRS -80s,分辨率较小,但现在没有人使用它们。传统观点认为最小的显示器宽度是 640 像素宽。

在过去 10 年中,许多开发人员将假定的最低分辨率提高到 1024x768,也称为 XGA(顺便说一句,自 20 世纪 90 年代中期以来,没有人再称它们为 VGA 或 XGA)。 1999 年以来生产的所有显卡都可以处理至少 1024 像素的最小宽度。

在过去的 10 年里,直到 3 年前华硕发明上网本类别之前,768 像素一直被许多开发人员假定为最小高度。大多数上网本的分辨率为 1024x600。因此,许多软件无法安装在上网本屏幕上(这让上网本用户非常烦恼)。

目前(因为我是那些上网本所有者之一)我自己的标准最小值是 1024x600,即 1024 像素宽 vs 600 像素高(实际上更像 560 像素,因为我通常必须考虑菜单栏和任务栏)。

注意:维基百科对标准显示器分辨率有一个很好的总结:http://en.wikipedia.org/wiki/Graphic_display_resolutions

For PCs (excluding embedded stuff like handphones, wristwatches, mp3 players, washing machines etc..) the smallest resolution is 640x480 otherwise known as VGA resolution.

There may be some PC-class computers like early Macs, Ataris or TRS-80s with smaller resolutions but nobody uses them nowdays. Conventional wisdom says the smallest monitor width is 640 pixels wide.

In the last 10 years a lot of developers have upped the assumed minimum resolution to 1024x768 otherwise known as XGA (btw, nobody calls them VGA or XGA anymore since the mid 1990s). All graphics card manufactured since 1999 can handle at least 1024 pixels as the minimum width.

768 pixels used to be assumed as the minimum height by a lot of developers in the last 10 years until 3 years ago when Asus invented the Netbook category. Most netbooks have a resolution of 1024x600. So a lot of software cannot fit on netbook screens (much to the annoyance of netbook owners).

Currently (since I'm one of those netbook owners) my own standard minimum is 1024x600, that is, 1024 pixels wide vs 600 pixels high (actually more like 560 pixels because I usually have to account for the menubar and the taskbar).

Note: wikipedia has a nice summary of standard monitor resolutions: http://en.wikipedia.org/wiki/Graphic_display_resolutions

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文