altsan / os2-estyler

Styler (eStyler) for OS/2
GNU General Public License v3.0
4 stars 2 forks source link

Import code for titlebar buttons handling #3

Open ydario opened 7 years ago

ydario commented 7 years ago

In the full product, titlebar buttons can be replaced with user defined sets. This feature should be imported into lite code so Theme Manager is not needed to change look&feel of buttons; also the change will work on the fly, without requiring a reboot.

ydario commented 7 years ago

After looking at code, I see that drawing titlebar buttons does not require frame subclassing. We only need to send the proper message to frame window to replace bitmaps.

With cc98c79 also the titlebar buttons can be customized using themes. The code uses XGA buttons, but it could be possible that VGA bitmaps are required for lower resolutions, this needs to be checked. Also the list of themes is hardcoded; the current Styler/2 list has been used to write the current list.

The changeset includes frame menu superclassing to allow custom drawing of buttons. E.g. to implement fly-over mouse support.

ydario commented 7 years ago

Added the base set of titlebar buttons in b125777.

ydario commented 7 years ago

I was wrong about superclassing... see 50e2fcd Code enabled again.