Andreas Kling
1dd1595043
LibGUI: Make GUI::Application a Core::Object
...
Having this on the stack makes whole-program teardown iffy. Turning it
into a Core::Object allows anyone who needs it to extends its lifetime.
2020-07-04 14:05:57 +02:00
Hüseyin ASLITÜRK
d139df706a
Welcome: Replace Label with Image component to show banner and app icon
2020-06-18 16:35:57 +02:00
Andreas Kling
116cf92156
LibGfx: Rename Rect,Point,Size => IntRect,IntPoint,IntSize
...
This fits nicer with FloatRect,FloatPoint,FloatSize and gives a much
better visual clue about what type of metric is being used.
2020-06-10 10:59:04 +02:00
Andreas Kling
977863ea07
LibGUI: Include keyboard modifier state with button on_click calls
...
This will allow you us to implement special behavior when Ctrl+clicking
a button.
2020-05-12 20:31:16 +02:00
Andreas Kling
028c011760
LibCore: Make Core::Object::add<ChildType> return a ChildType&
...
Since the returned object is now owned by the callee object, we can
simply vend a ChildType&. This allows us to use "." instead of "->"
at the call site, which is quite nice. :^)
2020-03-04 21:04:06 +01:00
Andreas Kling
0f3e57a6fb
LibGUI: Use GUI::Window::set_main_widget<WidgetType>() in clients
2020-03-04 14:26:16 +01:00
Andreas Kling
4697195645
LibGUI: Use set_layout<LayoutType>() in lots of client code
2020-03-04 13:49:48 +01:00
Andreas Kling
a26b63a958
LibGUI: Remove Button& parameter from Button::on_click hook
...
There was but a single user of this parameter and it's a bit tedious
to write it out every time, so let's get rid of it.
2020-03-03 17:02:38 +01:00
Andreas Kling
3d20da9ee4
Userspace: Use Core::Object::add() when building interfaces
2020-02-23 11:10:52 +01:00
thatlittlegit
51628f64fa
Welcome: Apply @shannonbooth's recommendations
2020-02-15 20:46:10 +01:00
thatlittlegit
f4958aea21
Welcome: Reduce the width and margins of the menu
...
I think it looks better where it takes up less space.
2020-02-15 20:46:10 +01:00
thatlittlegit
d5617fc855
Welcome: 'Welcome to Serenity' -> 'Welcome to SerenityOS'
2020-02-15 20:46:10 +01:00
thatlittlegit
7a3bdf3563
Welcome: Add icons to welcome entries
2020-02-15 20:46:10 +01:00
thatlittlegit
a55b96a1ea
Welcome: Separate text from source code by parsing
...
This allows modification at runtime, as well as easier editing than C++
structures.
2020-02-15 20:46:10 +01:00
thatlittlegit
7caa8b7531
Welcome: Add pledge and unveil
2020-02-15 20:46:10 +01:00
thatlittlegit
37daae1451
Welcome: Use a proper heading font for 'Welcome to Serenity!'
2020-02-15 20:46:10 +01:00
thatlittlegit
ce2c1e824d
Welcome: Push in the buttons depending on which page is selected
2020-02-15 20:46:10 +01:00
thatlittlegit
783f5dc07f
Welcome: Replace PNG background with gradient
...
This allows scaling to larger window sizes, something that the PNG
didn't do well.
2020-02-15 20:46:10 +01:00
Andreas Kling
34c7322d77
LibGUI: Remove some header dependencies from Widget.h
2020-02-14 23:53:11 +01:00
Andreas Kling
6a9cc66b97
LibGUI: Remove leading G from filenames
2020-02-06 20:33:02 +01:00
Andreas Kling
799b0a4fa8
LibGUI: Rename {H,V}BoxLayout => {Horizontal,Vertical}BoxLayout
2020-02-06 14:44:13 +01:00
Andreas Kling
5c06c32df4
LibGfx: Prefer using Gfx::Bitmap::load_from_file instead of load_png()
...
Code that just wants to open a Gfx::Bitmap from a file should not be
calling the PNG codec directly.
2020-02-06 13:39:17 +01:00
Andreas Kling
20cfd2a6bf
LibGfx: Unpublish Gfx::Rect from global namespace
2020-02-06 13:02:38 +01:00
Andreas Kling
9ac94d393e
LibGfx: Rename from LibDraw :^)
2020-02-06 12:04:00 +01:00
Andreas Kling
11580babbf
LibDraw: Put all classes in the Gfx namespace
...
I started adding things to a Draw namespace, but it somehow felt really
wrong seeing Draw::Rect and Draw::Bitmap, etc. So instead, let's rename
the library to LibGfx. :^)
2020-02-06 11:56:38 +01:00
Andreas Kling
c5bd9d4ed1
LibGUI: Put all classes in the GUI namespace and remove the leading G
...
This took me a moment. Welcome to the new world of GUI::Widget! :^)
2020-02-02 15:15:33 +01:00
Andreas Kling
d67da8c101
LibGUI: Add GHBoxLayout and GVBoxLayout convenience classes
2020-02-02 15:09:48 +01:00
Andreas Kling
94ca55cefd
Meta: Add license header to source files
...
As suggested by Joshua, this commit adds the 2-clause BSD license as a
comment block to the top of every source file.
For the first pass, I've just added myself for simplicity. I encourage
everyone to add themselves as copyright holders of any file they've
added or modified in some significant way. If I've added myself in
error somewhere, feel free to replace it with the appropriate copyright
holder instead.
Going forward, all new source files should include a license header.
2020-01-18 09:45:54 +01:00
Andreas Kling
bc319d9e88
LibCore: Make CObject reference-counted
...
Okay, I've spent a whole day on this now, and it finally kinda works!
With this patch, CObject and all of its derived classes are reference
counted instead of tree-owned.
The previous, Qt-like model was nice and familiar, but ultimately also
outdated and difficult to reason about.
CObject-derived types should now be stored in RefPtr/NonnullRefPtr and
each class can be constructed using the forwarding construct() helper:
auto widget = GWidget::construct(parent_widget);
Note that construct() simply forwards all arguments to an existing
constructor. It is inserted into each class by the C_OBJECT macro,
see CObject.h to understand how that works.
CObject::delete_later() disappears in this patch, as there is no longer
a single logical owner of a CObject.
2019-09-22 00:25:25 +02:00
Andreas Kling
defafd72bc
LibGUI: Convert custom widgets and subclasses to ObjectPtr
2019-09-21 20:04:00 +02:00
Andreas Kling
15a66dc8ab
Welcome: Unbreak after ObjectPtr changes
2019-09-21 19:42:16 +02:00
Andreas Kling
409494193e
LibGUI: Convert remaining random little things to ObjectPtr
2019-09-21 19:40:14 +02:00
Andreas Kling
45cfd57f6e
GButton: Convert most code to using ObjectPtr for GButton
2019-09-21 19:28:28 +02:00
Andreas Kling
7584480f62
LibGUI: Convert GWindow to ObjectPtr
2019-09-21 18:34:06 +02:00
Andreas Kling
ff6ce422dd
LibGUI: Convert GWidget to ObjectPtr
2019-09-21 17:05:35 +02:00
Andreas Kling
c7437f9caa
LibGUI: Convert GLabel to ObjectPtr
2019-09-21 15:25:08 +02:00
Conrad Pankoff
6fd096999e
Applications: Add "Welcome" application, inspired by Windows 98
2019-09-16 07:49:43 +02:00