Age | Commit message (Collapse) | Author |
|
Things were getting a little crowded in the project root, so this patch
moves the Lib*/ directories into Libraries/.
|
|
|
|
|
|
|
|
|
|
This makes checkable buttons exclusive with other checkable buttons in the
same parent widget. Basically like radio buttons. This should probably be
used to implement GRadioButton once it's a bit more mature.
|
|
|
|
|
|
|
|
|
|
Added a Rect::align_within(other_rect, alignment) helper that seemed useful.
|
|
|
|
This gives all the GAbstractButton a consistent disabled appearance.
|
|
It's good to have a place where we can try out all the different widgets.
This needs some more work on a nice layout, and should also include more
of the widgets. :^)
|
|
This patch moves GButton and GRadioButton to inherit from it. This allows
them to share code for mouse event handling, etc.
|
|
|
|
|
|
|
|
Based on a patch from "pd" (thanks!)
|
|
We can't rely exclusively on enter and leave events to update the hovered
state, since leave will not be delivered while the widget is auto-tracking
the mouse (between mousedown and mouseup.)
|
|
We should still update the pressed state depending on the event position,
even if GMouseButton::Left is not the only button pressed.
|
|
They show up as checkable GButtons in GToolBar, and with (or without) check
marks in menus.
There are a bunch of places to make use of this. This patch only takes
advantage of it in the FileManager for the view type actions.
|
|
|
|
The icons are passed around as filesystem paths for now, since the shared
memory bitmaps only support 2 sides.
|
|
The enabled state of a GAction now propagates both to any toolbar buttons
and any menu items linked to the action. Toolbar buttons are painted in
a grayed out style when disabled. Menu items are gray when disabled. :^)
|
|
|
|
|
|
|
|
|
|
|
|
This is useful for static locals that never need to be destroyed:
Thing& Thing::the()
{
static Eternal<Thing> the;
return the;
}
The object will be allocated in data segment memory and will never have
its destructor invoked.
|
|
It was confusing to see multiple calls to set_foo() in a row. Since this is
an intersecting operation, let's call it add_clip_rect() instead.
|
|
I want to paint some buttons in WindowServer where we don't have LibGUI.
|
|
This gets rid of the last little piece of LibGUI knowledge in Painter.
|
|
When a mouse button is pressed inside a window, put that window into an
automatic mouse tracking state where all mouse events are sent to that
window until all mouse buttons are released.
This might feel even better if it only cared about the mouse buttons you
actually pressed while *inside* the windows to get released, I don't know.
I'll have to use it for a while and see how it's like.
|
|
Use this to implement some of the toolbar actions in IRCClient. :^)
|
|
This patch adds a simple GMessageBox that can run in a nested event loop.
Here's how you use it:
GMessageBox box("Message text here", "Message window title");
int result = box.exec();
The next step is to make the WindowServer respect the modality flag of
these windows and prevent interaction with other windows in the same
process until the modal window has been closed.
|
|
|
|
|
|
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. :^)
|
|
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.
|
|
This patch also adds a Format concept to GraphicsBitmap. For now there are
only two formats: RGB32 and RGBA32. Windows with alpha channel have their
backing stores created in the RGBA32 format.
Use this to make Terminal windows semi-transparent for that comfy rice look.
There is one problem here, in that window compositing overdraw incurs
multiple passes of blending of the same pixels. This leads to a mismatch in
opacity which is obviously not good. I will work on this in a later patch.
The alpha blending is currently straight C++. It should be relatively easy
to optimize this using SSE instructions.
For now I'm just happy with the cute effect. :^)
|
|
|
|
Since GScrollBar wants its internal buttons to look like GButtons,
let's share the painting code between them.
|
|
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.
|
|
|
|
LizaRegular is quickly becoming my favorite bitmap font. It's so pretty :^)
|
|
|
|
|
|
Implement this functionality by adding global cursor tracking.
It's currently only possible for one GWidget per GWindow to track the cursor.
|