Commit graph

1929 commits

Author SHA1 Message Date
Andreas Kling
7a74b76769 GWidget: Silence debug spam about the click clock. 2019-04-13 16:15:47 +02:00
Andreas Kling
28cf9a41fe Minesweeper: Make it possible to win the game. :^) 2019-04-13 15:51:29 +02:00
Andreas Kling
198a1a6877 Minesweeper: Add some menus. 2019-04-13 14:32:18 +02:00
Andreas Kling
49b63efddb Minesweeper: Turn the field into a GFrame for that containery look. 2019-04-13 14:22:40 +02:00
Andreas Kling
3f37665492 Minesweeper: Fix wrong adjacency numbers on right and bottom edges. 2019-04-13 14:14:38 +02:00
Andreas Kling
0dbd7b0409 Fix typo in makeall.sh 2019-04-13 13:19:47 +02:00
Andreas Kling
0f4050903d GVariant: Add to_bool(), to_int() and to_color(). 2019-04-13 12:39:20 +02:00
Andreas Kling
4df360be8c Minesweeper: More implementation work. 2019-04-13 03:57:55 +02:00
Andreas Kling
a90e218c71 Minesweeper: Start working on a simple minesweeper game. :^) 2019-04-13 03:08:16 +02:00
Andreas Kling
c06a3bdeb4 LibGUI+WindowServer: Add support for per-GWidget context menus.
You can now simply assign a GMenu as a GWidget's context menu and it will
automagically pop up on right click. :^)
2019-04-12 17:18:13 +02:00
Andreas Kling
8feecf6c77 AK: Fix build. 2019-04-12 16:43:48 +02:00
Andreas Kling
c98bbff0cb VisualBuilder: Add some widget-specific properties. 2019-04-12 15:17:53 +02:00
Andreas Kling
3674bb9429 GVariant: Tweak stringification of Color, Boolean and Invalid variants. 2019-04-12 14:49:45 +02:00
Andreas Kling
6f90f41516 VisualBuilder: Add some more GWidget default properties. 2019-04-12 14:47:21 +02:00
Andreas Kling
8f4c59c276 GVariant: Don't crash when extracting a null String. 2019-04-12 14:43:44 +02:00
Andreas Kling
054c982181 LibGUI+WindowServer: Add support for enabled/disabled actions.
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. :^)
2019-04-12 02:53:27 +02:00
Andreas Kling
32e5c8c689 GTextEditor: Add on_selection_changed callback.
This is probably a bit eager and won't coalesce all updates or even
ignore no-op changes to the selection.
2019-04-12 02:52:34 +02:00
Andreas Kling
09339fa912 StylePainter: Don't paint hover frame around disabled CoolBar buttons. 2019-04-12 02:51:59 +02:00
Andreas Kling
269886fc4e GWidget: Add "enabled" state for widgets.
There's nothing magical that happens for painting, each widget needs to
handle it manually in their painting code.
2019-04-12 02:51:16 +02:00
Andreas Kling
a1015840ff Color: Add a simple lightened() helper. 2019-04-12 02:50:43 +02:00
Andreas Kling
476c43ab22 Painter: Add alpha-blending support to blit_dimmed(). 2019-04-12 02:50:28 +02:00
Andreas Kling
0f5114852a Kernel: Spawn text editor by default while I work on it. 2019-04-12 00:58:09 +02:00
Andreas Kling
47a2982119 LibCore: Move LibGUI/GTimer to LibCore/CTimer. 2019-04-12 00:09:45 +02:00
Andreas Kling
667e678aa6 LibCore: Prune remaining knowledge about LibGUI. 2019-04-12 00:03:21 +02:00
Andreas Kling
c736dbdf10 VisualBuilder: Add a text box to the properties window. 2019-04-11 23:57:58 +02:00
Andreas Kling
3cddc3484e VisualBuilder: Add [x, y, width, height] properties for all widgets.
At first I tried doing this as a single "rect" property but I like the
feel of the individual properties much better. :^)
2019-04-11 22:54:04 +02:00
Andreas Kling
c425bc2e71 GVariant: Add Point, Size and Rect variant types. 2019-04-11 22:52:34 +02:00
Andreas Kling
ec841f3a23 VisualBuilder: Move properties window to its own class. 2019-04-11 22:03:55 +02:00
Andreas Kling
21d4b1c2fc VisualBuilder: Tweak property table column width. 2019-04-11 21:55:57 +02:00
Andreas Kling
34dd4fcaf1 VisualBuilder: Display read-only propery values in gray. 2019-04-11 21:53:39 +02:00
Andreas Kling
383b2efc1f VisualBuilder: Remove debug spam. 2019-04-11 21:47:50 +02:00
Andreas Kling
707bfe848d VisualBuilder: Add a table view with the selected widget's properties. 2019-04-11 21:41:09 +02:00
Andreas Kling
c57cf9834b LibGUI: Add GVariant copy constructor. 2019-04-11 21:36:04 +02:00
Andreas Kling
52152e171b GVariant: Zero out invalid GVariants to unconfuse debugging. 2019-04-11 17:28:59 +02:00
Andreas Kling
ef23ed7ef1 GTableView: Handle not having a model a bit more gracefully. 2019-04-11 17:26:30 +02:00
Andreas Kling
f52e66ceda VisualBuilder: Add a widget registry and a property class.
I need somewhere to centralize the knowledge about the different widget
types available. And VBProperty represents a property key/value of arbitrary
type (it uses a GVariant for the value.)
2019-04-11 16:13:19 +02:00
Andreas Kling
ba4a726e8b VisualBuilder: Add a properties window. 2019-04-11 15:43:26 +02:00
Andreas Kling
93b76628a5 GGroupBox: Improve appearance with new FrameShape::Box style. 2019-04-11 14:27:31 +02:00
Andreas Kling
f0501a0102 VisualBuilder: Add GGroupBox.
The icon currently looks better than a real GGroupBox. I have to fix that.
2019-04-11 13:46:25 +02:00
Andreas Kling
16990fece3 GScrollBar: Improve appearance for curiously-shaped scrollbars. 2019-04-11 13:16:43 +02:00
Andreas Kling
07a9b2c4e6 VisualBuilder: Let's use 5 pixels for the grid size for now. 2019-04-11 13:16:18 +02:00
Andreas Kling
3f67298dad VisualBuilder: Add GScrollBar (and yes, an icon for it, too.) 2019-04-11 06:42:07 +02:00
Andreas Kling
f25c524f20 VisualBuilder: Add GCheckBox and GLabel, and draw icons for them, too. 2019-04-11 06:32:27 +02:00
Andreas Kling
b5d1cfef58 VisualBuilder: Add icons to the toolbox, and support for GProgressBar. 2019-04-11 06:08:06 +02:00
Andreas Kling
75c76f6692 VisualBuilder: Make it possible to insert widgets from the toolbox. 2019-04-11 04:13:11 +02:00
Andreas Kling
c71ece77fa VisualBuilder: Tweak grid size and add an (empty) toolbox window. 2019-04-11 04:01:17 +02:00
Andreas Kling
c6ffb3e2b8 VisualBuilder: Use real GWidgets instead of pretend VBWidgets.
That first design was the wrong idea. Instead, have VBWidget instantiate
a GWidget of the appropriate type and parent it to the VBForm.
We then use a new "greedy hit-testing" mechanism in GWidget to prevent any
mouse events from reaching the VBForm's children.

To paint the grabbers above the child widgets, I added a slightly hackish
but kind of neat second_paint_event() that is called after a widget has
painted all of his children. :^)
2019-04-11 03:34:37 +02:00
Andreas Kling
af070324db WindowServer: Tweak window title positioning. 2019-04-11 02:59:40 +02:00
Andreas Kling
ead6524c0a VisualBuilder: Add the first VBWidget subclass: VBButtonWidget. :^) 2019-04-11 02:49:10 +02:00
Andreas Kling
d73f79a2d2 VisualBuilder: Allow resizing widgets using their grabbers. 2019-04-11 02:35:30 +02:00