我一直在到处寻找关于如何发布具有当今“高端”外观的应用程序的良好解决方案/技巧。
众所周知,当使用 Windows 进行编码时,我们通常会得到 Windows 风格的颜色/按钮/列表等。它们只是看起来和感觉都很丑。
当我们决定要出售应用程序时,人们希望它看起来不错 - 显然是因为他们已经为此付费了。
那么问题是:
- 今天良好的应用外观是如何实现的?
- 楼主画的? (真的吗?)
- 自定义控件?
- 一些好的非免费库可以完成“脏”工作并“剥皮”您的应用程序?
我不相信程序员会做那些“透支”的技巧和技巧,完全完成一个控件需要很长时间。此外,我宁愿花时间编写内部应用程序的内容,而不是玩弄每个控件的绘图。
我不知道,但有一个最后期限,现在在浏览完谷歌上所有这些“ownerdrawed”控件之后 - 我发现这不是问题。当程序员需要让他的作品变得更方便时,必须有其他东西可以派上用场应用程序看起来很高端!
请帮忙,有什么工具吗?有什么建议吗?任何-任何东西..?
几个例子,他们如何实现这种外观:
http://fooh.pl/pokaz/3198197337370da4cdfdebf0ae13933c_openfm.jpg
I've been looking everywhere to find a good solution / tip on how to release an application that has todays 'top-end' look.
As we all know, when coding with windows we normally get windows-style colors/buttons/lists etc. They just look and feel ugly.
When we decide we want to sell an application, people want it to look good - obviously because they have paid for it.
So the question is:
- How is the good application look achieved today?
- Owner drawing? ( really?? )
- custom-controls ?
- some good non-free libraries that do the 'dirty' work and 'skin' your application?
I don't believe programmers do those 'overdrawn' tips and tricks, it takes so long to have one control completely done.. Besides, i would rather spend that time coding the internal application stuff than playing around with per-control drawing..
I have no clue, but have a deadline and now after going through all those 'ownerdrawed' controls on google - i came up that this is not the thing.. There has to be something else that comes handy when a programmer needs to make his application look top-end!.
Please help, any tools ? any tips ? any-anything.. ?
Few examples, how do they achieve that look:
http://fooh.pl/pokaz/3198197337370da4cdfdebf0ae13933c_openfm.jpg
发布评论
评论(9)
例如,您可以查看Qt。除了其基本功能之外,您还可以样式所有小部件以满足您的喜好(以与 CSS 非常相似的方式)并因此根据您的喜好创建“主题”。
对于链接到的图像中窗口的非矩形外观,您可以使用 Qt 的 setMask() 功能。
You could have a look at Qt for example. In addition to its basic functionality, you can also style all Widgets to your liking (in a manner very similar to CSS) and as such create "themes" to your heart's content.
For the non-rectangular look of the window in the image you link to, you can use Qt's setMask() functionality.
C++ 团队整理了一个名为 Hilo 的示例(就像夏威夷的地方),该示例不使用任何框架 (没有 ATL,没有 MFC)并且都是本机代码。它使用了许多 Windows 7 功能以及一些令人愉快的图形和动画。所有代码和设计均可用并记录在案。看看吧。
The C++ team put together a sample called Hilo (like the place in Hawaii) that uses no frameworks (no ATL, no MFC) and is all native code. It uses a number of Windows 7 capabilities and some delightful graphics and animations. All the code and design is available and documented. Take a look.
如果您想深入了解任何特定应用程序的内部情况,您可以启动间谍实用程序并查看界面已分解为多少个控件:
我想要 Spy++,但我没有 Visual Studio
WPF 有类似 Spy++ 的实用程序吗?
例如...在皮肤模式下监视 Windows Media Player 会发现有一个名为
WMP Skin Host
的窗口类,并且您可以看到它有零个子窗口。 (常规的非皮肤模式被分解为一些列表框和按钮等。)根据我的经验,当人们重新实现太多而无法尝试“看起来很酷”时,“现代”皮肤通常是一场灾难。它阻碍了自动化(通过诸如 AutoIt 之类的东西)提及针对残疾人士的辅助功能。此外,如果您不使用基于操作系统的主题 API,那么今天看起来很酷的内容将不会保持最新状态。
(注意:因为我总体上是 Qt 的粉丝,所以我建议查看 QStyle 和 QStylePainter。但这更多的是“主题化”而不是“换肤”。)
我会非常谨慎地在应用程序中使用换肤,除非我发现我是这样的。为绝对需要它的市场(如音乐播放器)而开发。
If you want to dig under the covers of any specific app, you can fire up a Spy Utility and see how many controls an interface has been broken down into:
I want Spy++ but I don't have Visual Studio
Is there a Spy++ like utility for WPF?
For instance...spying into Windows Media Player in skinned mode finds that there is a window class called
WMP Skin Host
, and you can see that it has zero child windows. (The regular non-skinned mode is broken into some list boxes and buttons such.)In my experience, "modern" skinning is generally a disaster when people re-implement too much to try and "look cool". It hampers both automation (through things like AutoIt) not to mention the accessibility features for the disabled. Also, what looks cool today will not stay current if you're not using an OS-based theming API.
(Note: Because I'm a fan of Qt in general, I would suggest looking into the QStyle and QStylePainter. But this is more "theming" than "skinning".)
I would be very wary of using skinning in an app, unless I found out that I was developing for a market that absolutely demanded it (like music players).
通常,您可以使用 GDI(+) 渲染来渲染自定义控件。
Usually, you can render custom controls with GDI(+) rendering.
如果您不介意使用 C++/CLI,可以使用 WPF,它提供对用户定义的样式和模板的相当广泛的控制。
If you don't mind getting into C++/CLI, there is WPF, it offers pretty extensive control over user defined styles and templates.
您可能想仔细看看 SkinCrafter。它成熟、稳定,而且非常灵活。我不再使用它,但我的使用体验非常愉快。
You might want to take a good look at SkinCrafter. It's mature, stable, and very flexible. I no longer use it but my experience with it was quite enjoyable.
该应用程序中可能没有单个控件。
相反,整个事物被渲染为图像。有一个背景图像,以及一些覆盖图像(大部分是透明的),以提供鼠标悬停突出显示、禁用控件等。唯一没有预渲染的是当前曲目和播放列表信息,它是具有特定字体的纯文本。
可以使用另一张图像执行命中测试。
程序员实际上不需要做任何工作来实现奇特的设计,这一切都是由艺术家完成的(并且像 Photoshop 这样的程序在编辑器中支持图层,使得构建所有覆盖层变得非常容易)。
当然,缺点是按钮的行为与普通 Win32 按钮的行为不完全相同。它们不支持键盘焦点(尽管可能有热键)并且只需在鼠标松开时激活。可访问性非常糟糕,没有屏幕阅读器的信息,并且应用程序不尊重系统字体大小设置。为了使视力不佳的人也能阅读 UI,需要完全不同的皮肤。
There probably is not a single control in that application.
Instead, the whole thing is rendered as an image. There's a background image, along with some overlay images (mostly transparent) to provide mouseover-highlight, disabled controls, etc. The only thing that's not prerendered is the current track and playlist information, which is pure text with a particular font.
Hit-testing can be performed with yet another image.
The programmer does virtually no work to implement the fancy design, it's all done by an artist (and programs like Photoshop support layers in the editor, making it quite easy to construct all the overlays).
The downside, of course, is that buttons don't act exactly like normal Win32 buttons do. They don't support keyboard focus (although there probably are hotkeys) and simply activate on mouseup. And accessibility is horrendous, there's no information for a screenreader, and the application doesn't respect system font-size settings. In order to make the UI readable by people with poor eyesight, an entirely different skin is required.
听起来您想要一个完全可换肤的应用程序,但不需要比典型的 Win32 控件付出更多的努力。 这是不可能的。但剥皮一般来说并不困难,只是比您愿意花费的时间要多。
您的下一个问题是:一旦您拥有了皮肤应用程序,您需要专业的图形设计师来开发良好的皮肤。太多的小项目开发人员认为他们可以制作自己的皮肤,但它几乎总是看起来很糟糕。如果没有设计专家,您想要的性感专业外观是不可能实现的。
最后,无论您最终获得什么精美的自定义皮肤,其功能都可能需要自定义。也就是说,如果你想要非矩形控件,或者动画,这些都是你必须花时间开发的东西。
使用像 Qt 这样的工具包可能是一项不错的投资。但这是一种无论你如何剖析都需要花费大量精力的细节。
有点题外话:由 UI 专家正确设计的默认 Windows 控件往往看起来非常专业。使用本机 Windows 控件有很多好处,在尝试重新发明轮子之前,您应该认真考虑:
It sounds like you want a fully skinnable app, but for no more effort than typical Win32 controls. This is impossible. But skinning is not difficult in general, just more time consuming than you're willing to spend.
Your next problem is: Once you have a skinned app, you need a professional graphic designer to develop a good skin. Too many small-project developers think they can make their own skin but it almost always looks terrible. This sexy professional look you want is impossible without a design expert.
And finally, whatever fancy custom skin you end up with, the functionality will likely need to be custom. That is, if you want non-rectangular controls, or animations, these are things you must spend the time to develop.
Using a toolkit like Qt can be a nice investment. But this is the kind of detail that takes a lot of effort no matter how you slice it.
Somewhat beside the point: Designed correctly by a UI expert, the default windows controls tend to look very professional. There are so many benefits to using native windows controls, you should really think carefully before trying to re-invent the wheel:
您可以使用外部布局引擎,其中之一是terra informatica的HTMLayout,这个也使用一些专业软件。
You could use external layout engines, one such is HTMLayout from terra informatica, this one is also used some professional software.