Commit graph

16 commits

Author SHA1 Message Date
Andreas Kling
4ab0cd5d4c LibGUI: Move frame painting from GFrame to StylePainter.
This way it can be used by others who might not have a GFrame object.
2019-04-10 03:43:46 +02:00
Andreas Kling
c02c9880b6 AK: Add Eternal<T> and use it in various places.
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.
2019-04-03 16:52:25 +02:00
Andreas Kling
f242d6e559 FileManager: Tweak look of thumbnailing progress bar.
Since it's inside a status bar, it looks a bit better when using a panel
shape with sunken shadow.
2019-03-30 13:12:59 +01:00
Andreas Kling
f249c40aaa Rename Painter::set_clip_rect() to add_clip_rect().
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.
2019-03-29 15:01:54 +01:00
Andreas Kling
d48f486634 LibGUI: Don't draw left and right side of surfaces that span entire window.
In other words, if a surface stretches from the left side of the window
all the way to the right side, skip shading and highlighting the sides.
This makes widgets blend together just slightly with the window. :^)
2019-03-29 02:20:22 +01:00
Andreas Kling
c7ab643883 Move LibGUI/GStyle to SharedGraphics/StylePainter.
I want to paint some buttons in WindowServer where we don't have LibGUI.
2019-03-28 17:32:38 +01:00
Andreas Kling
9fa21fa585 LibGUI: Add a GPainter class that inherits from Painter.
This gets rid of the last little piece of LibGUI knowledge in Painter.
2019-03-28 17:19:56 +01:00
Andreas Kling
cb296ffede LibGUI: Add a GFrame class that can be inherited by framey widgets.
This will gather the code for painting sunken/raised frames etc in a single
place and make it easier add a bit of pleasant shading to UI's. :^)
2019-03-28 15:30:29 +01:00
Andreas Kling
5d69bf06d2 LibGUI: Don't fill widgets with background color by defualt. 2019-03-10 13:16:36 +01:00
Andreas Kling
4ea7a51ecd LibGUI: Improve GStatusBar and GToolBar and share some code via GStyle. 2019-03-04 10:47:54 +01:00
Andreas Kling
567a403683 LibGUI: Tweak GStatusBar margins. 2019-02-28 22:33:39 +01:00
Andreas Kling
737a4d2377 LibGUI: Both GToolBar and GStatusBar should have highlight/shadow. 2019-02-28 19:31:37 +01:00
Andreas Kling
c5d88ff0d8 LibGUI: Top line on GStatusBar should be a highlight, not a shadow. 2019-02-28 19:17:08 +01:00
Andreas Kling
fd428d6ed3 SharedGraphics: Make Painter clipping work with translated clip origin. 2019-02-28 18:57:36 +01:00
Andreas Kling
d74b131c27 Add a little About app and hook it up to the system menu's "About..." entry.
Added icons and customizable text alignment to GLabel.
2019-02-12 15:23:07 +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