Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#55 closed enhancement (fixed)

Implement window icons

Reported by: Dmitry A. Kuminov Owned by:
Priority: major Milestone: Qt Beta 4
Component: QtGui Version: 4.5.1 Beta 1
Severity: Keywords:
Cc:

Description

QWidgetPrivate::setWindowIcon_sys() is a stub now and must be implemented to make it possible to set window icons.

Change History (3)

comment:1 by Silvan Scherrer, 15 years ago

Milestone: Qt GAQt Beta4
Priority: blockermajor

comment:2 by Dmitry A. Kuminov, 15 years ago

Resolution: fixed
Status: newclosed

Done in r309. Please note the following things:

  1. It is not possible to programmatically create a HPOINTER object that contains both the full-size (e.g. 32x32 or 40x40) and the half-size (16x16 or 20x20) icons (due to a bug in WinCreatePointerIndirect()). As a result, the icon to set may only have one size. Since most of the time the application displays a half-size icon (in the titlebar and in XCenter), and the full size icon is only necessary for the window switcher, QWidget::setWindowIcon() will convert a QIcon to a half-size HPOINTER and send it to the frame window. Therefore, if you want to have both icon sizes for your application, you will have to use a resource file to attach an external .ICO file (that can contain many various icon sizes) to the executable.
  1. Alpha channel is not supported by PM. This means that although I can alpha blend graphics within Qt and even in the xsystray widget, I cannot do so for other PM apps. For this reason, it's recommended to provide modified icons for Qt applications built on OS/2 that will have the 8-bit alpha channel converted to the 1-bit transparency mask. Yes, if missing, Qt will perform this conversion automatically but the result will not be perfect if the alpha mask contains anything besides "fully opaque" and "fully transparent".

comment:3 by Dmitry A. Kuminov, 15 years ago

By "other PM apps" I mean the standard PM window title bar and the XCenter in the first place. Strictly speaking, we may subclass the title bar class and do alpha blending there too and we can patch the relevant XCenter plugin for that as well. But that's a task for the future.

Note: See TracTickets for help on using tickets.