Commit Graph

9 Commits

Author SHA1 Message Date
Andreas Kling
bf30502560 LibGUI: Implement enter/leave events (with WindowServer support.)
Windows now learn when the mouse cursor leaves or enters them.
Use this to implement GWidget::{enter,leave}_event() and use that
to implement the CoolBar button effect. :^)
2019-02-20 10:12:19 +01:00
Andreas Kling
d353c7c3d6 LibGUI: Support different button styles.
I want to try an MS Office 97 "CoolBar" inspired look for my toolbars.
This is only the painting support, we still need hover events to implement
the actual effect.
2019-02-20 09:22:38 +01:00
Andreas Kling
6d7f000ffc Launcher: Factor the app buttons into a LaunchButton class.
Added some LibGUI helpers while I'm at it.
2019-02-08 00:15:04 +01:00
Andreas Kling
887b4a7a1a Start working on a simple Launcher app.
Let GButton have an optional icon (GraphicsBitmap) that gets rendered in the
middle of the button if present.

Also add GraphicsBitmap::load_from_file() which allows mmap'ed RGBA32 files.
I wrote a little program to take "raw" files from GIMP and swizzle them into
the correct byte order.
2019-02-07 23:17:06 +01:00
Andreas Kling
069d21ed7f Make buttons unpress when the cursor leaves the button rect.
Implement this functionality by adding global cursor tracking.
It's currently only possible for one GWidget per GWindow to track the cursor.
2019-01-27 08:48:34 +01:00
Andreas Kling
d66b0f7dd8 LibGUI: Mass coding style fixes. 2019-01-21 00:54:35 +01:00
Andreas Kling
6c4f1bad09 guitest2: Add a simple launcher so I can easily spawn more Terminals.
Also update GButton coding style.
2019-01-21 00:31:48 +01:00
Andreas Kling
d4cce87dbc LibGUI: Minor fixes. 2019-01-20 08:16:02 +01:00
Andreas Kling
b91479d9b9 Rename all the LibGUI classes to GClassName. 2019-01-20 04:49:48 +01:00