Commit Graph

20 Commits

Author SHA1 Message Date
Andrew Kaster
d8ab9ed87c LibGfx+Userland: Remove dependency on GUI::TabWidget from StylePainter
Move TabPosition into its own file, and using it into the global
namespace the same way we do for Gfx::Orientation. This unbreaks the gn
build, and out of tree builds.
2023-10-27 16:51:03 -06:00
thankyouverycool
f7e034d4b2 LibGfx+Userland: Merge FrameShape and FrameShadow into FrameStyle
Previously, Frames could set both these properties along with a
thickness to confusing effect: Most shapes of the same shadowing only
differentiated at a thickness >= 2, and some not at all. This led
to a lot of creative but ultimately superfluous choices in the code.

Instead let's streamline our options, automate thickness, and get
the right look without so much guesswork.

Plain shadowing has been consolidated into a single Plain style,
and 0 thickness can be had by setting style to NoFrame.
2023-04-30 05:49:46 +02:00
thankyouverycool
5917545633 LibGUI+LibGfx: Let Desktop::the() set widget effects
Scrolling can now be set Coarse or Smooth system-wide, Splitter
knurls and Tab accents toggled on and off, and Menu flashing
disabled.
2022-08-09 12:08:21 +02:00
Cameron Youell
5b82bd719e LibGUI: TabWidget add vertical tabs
Add vertical tabs to TabWidget, this can be set using
the ```TabWidget::set_tab_position``` function or in the GML
2022-05-21 22:25:16 +02:00
Lenny Maiorani
9c56a83b76 Libraries: Use default constructors/destructors in LibGfx
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules

"The compiler is more likely to get the default semantics right and
you cannot implement these functions better than the compiler."
2022-03-17 17:23:49 +00:00
thankyouverycool
bb4963a697 LibGfx+LibGUI: Add FrameShape::Window
This shape is for use by the main widget of a frameless window
that still wishes to have proper borders but no title.

Raised Containers were used previously for this pattern but did not
always represent perspective and shadow correctly depending on thread
highlighting and the immediate background color. Containers are
really meant to be used inside other widgets where the background
color can be controlled.
2022-02-25 19:38:23 +01:00
thankyouverycool
7a7e57ced0 LibGfx+LibGUI: Remove {Horizontal,Vertical}Line FrameShapes
These were added 3 years ago but never used. Their intended purpose
was probably superceded by the Separator widget.
2022-02-25 19:38:23 +01:00
thankyouverycool
f77ac3a73c LibGUI: Allow Buttons to set themselves as default
Several apps were implementing this behavior ad hoc. This provides
a standard API as well as a comfy visual cue for default return key
behavior.
2022-01-26 23:19:54 +01:00
Andreas Kling
8b1108e485 Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
Sam Atkins
885ca2f968 LibGfx+WindowServer: Move shadow-painting code to StylePainter
Specifically, this is to make it accessible to ThemeEditor, but there's
nothing about it that is especially window-specific.
2021-10-28 11:23:44 +02:00
Sam Atkins
cf188df86c LibGfx: Make style painters use east const and virtual specifiers 2021-10-28 11:23:44 +02:00
Ben Wiederhake
9d2e06b039 LibGUI: Add missing headers 2021-10-06 23:52:40 +01:00
Andreas Kling
b8416df173 LibGUI+LibGfx: Make scrollbar buttons a little bit thicker
The common thin-cap button look (1px highlight, 2px shadow) looks nice
on regular buttons, but the scrollbar didn't feel quite right.
This patch adds 1px of offset to the highlight, giving it a thick-cap
look (which I have named Gfx::ButtonStyle::ThickCap) :^)
2021-08-31 01:35:08 +02:00
Andreas Kling
410b3c85b6 LibGUI+LibGfx: Highlight currently active tab button with accent color
Use the new "Accent" color role to emphasize the currently active tab
within a GUI::TabWidget. :^)
2021-07-28 20:25:14 +02:00
Andreas Kling
03cca20699 LibGfx: Remove unused StylePainter::paint_surface() 2021-07-28 19:13:08 +02:00
Brian Gianforcaro
1682f0b760 Everything: Move to SPDX license identifiers in all files.
SPDX License Identifiers are a more compact / standardized
way of representing file license information.

See: https://spdx.dev/resources/use/#identifiers

This was done with the `ambr` search and replace tool.

 ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-22 11:22:27 +02:00
Andreas Kling
a2baab38fd Everywhere: It's now "Foobar", not "FooBar", and not "foo bar"
I hereby declare these to be full nouns that we don't split,
neither by space, nor by underscore:

- Breadcrumbbar
- Coolbar
- Menubar
- Progressbar
- Scrollbar
- Statusbar
- Taskbar
- Toolbar

This patch makes everything consistent by replacing every other variant
of these with the proper one. :^)
2021-04-13 16:58:15 +02:00
Andreas Kling
11bea5d633 LibGfx+Base: Add Tray/TrayText theme colors and Gfx::ButtonStyle::Tray
A "Tray" is a sunken container area for widgets. The first intended
client of this style is the GUI::FilePicker's common locations frame.

Thanks to @nvella for coming up with the term "Tray" :^)
2021-04-09 21:53:43 +02:00
thankyouverycool
5806630cf4 LibGfx+LibGUI: Add support for vertical ProgressBars 2021-03-12 09:59:03 +01:00
Andreas Kling
13d7c09125 Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00