Commit Graph

13 Commits

Author SHA1 Message Date
Andreas Kling
b8f999cbef About+LibGUI: Use a GBoxLayout for the About app. 2019-03-09 21:09:29 +01:00
Andreas Kling
949c98c5af LibGUI: Implement GToolbar separators. 2019-03-07 23:01:36 +01:00
Andreas Kling
483e0a5526 SharedGraphics: Add Rect::center_within(Rect). 2019-03-03 13:34:50 +01:00
Andreas Kling
40c8dd80d1 LibGUI: Draw separators between GTableView column headers. 2019-02-28 11:04:03 +01:00
Andreas Kling
98784ad3cb WindowServer: Avoid overdraw by shattering dirty rects into unique shards.
The algorithm I came up with is O(n^2) but given the small numbers of rects
we're typically working with, it doesn't really matter. May need to revisit
this in the future if we find ourselves with a huge number of rects.
2019-02-19 14:49:23 +01:00
Andreas Kling
29c49356e3 WindowServer: Rename GUI_Foo to WSAPI_Foo. 2019-02-15 09:17:18 +01:00
Andreas Kling
53d34a0885 Port Terminal to LibGUI.
To facilitate listening for action on arbitrary file descriptors,
I've added a GNotifier class. It's quite simple but very useful:

GNotifier notifier(fd, GNotifier::Read);
notifier.on_ready_to_read = [this] (GNotifier& fd) {
    // read from fd or whatever else you like :^)
};

The callback will get invoked by GEventLoop when select() says we
have something to read on the fd.
2019-02-10 14:28:39 +01:00
Andreas Kling
2def3d8d3f LibGUI: Start adding an automatic widget layout system.
My needs are really quite simple, so I'm just going to add what I need
as I go along. The first thing I needed was a simple box layout with
widgets being able to say whether they prefer fixed or fill for both
their vertical and horizontal sizes.

I also made a simple GStatusBar so FileManager can show how many bytes
worth of files are in the current directory.
2019-02-10 11:07:13 +01:00
Andreas Kling
e354c08c98 LibGUI: Share code for widget rendering styles in a GStyle class.
Since GScrollBar wants its internal buttons to look like GButtons,
let's share the painting code between them.
2019-02-10 07:11:01 +01:00
Andreas Kling
1f355f2a79 LibGUI: Start working on a GScrollBar.
This widget is far from finished, but it's off to a good start.
Also added a GResizeEvent and GWidget::resize_event() so that widgets
can react to being resized.
2019-02-09 11:19:38 +01:00
Andreas Kling
38f589a9cb SharedGraphics: Add some useful painting helpers and make use of them. 2019-02-05 11:42:58 +01:00
Andreas Kling
3271c115e2 WindowServer: Only blit dirty rect of windows to back buffer.
Previously we'd blit every pixel in every window that intersected any dirty
rect to the back buffer. With this patch, we limit ourselves to blitting the
pixels inside the actual dirty rects.

There's still a lot of optimizations to make in this code.
2019-01-20 23:42:36 +01:00
Andreas Kling
7e5b81fe48 Make a SharedGraphics directory for classes shared between Kernel and LibGUI. 2019-01-19 23:22:46 +01:00