summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGfx/ClassicWindowTheme.cpp
AgeCommit message (Collapse)Author
2023-05-23LibGfx+Everywhere: Change `Gfx::Rect` to be endpoint exclusiveJelle Raaijmakers
Previously, calling `.right()` on a `Gfx::Rect` would return the last column's coordinate still inside the rectangle, or `left + width - 1`. This is called 'endpoint inclusive' and does not make a lot of sense for `Gfx::Rect<float>` where a rectangle of width 5 at position (0, 0) would return 4 as its right side. This same problem exists for `.bottom()`. This changes `Gfx::Rect` to be endpoint exclusive, which gives us the nice property that `width = right - left` and `height = bottom - top`. It enables us to treat `Gfx::Rect<int>` and `Gfx::Rect<float>` exactly the same. All users of `Gfx::Rect` have been updated accordingly.
2023-03-04Userland: Use Font::pixel_size_rounded_up() in more placesAndreas Kling
2023-03-04Userland: Use Font::pixel_size_rounded_up() instead of glyph_height()Andreas Kling
The only remaining clients of this API are specific to bitmap fonts and editing thereof.
2023-01-06LibGfx: Round menu font size up when calculating menubar heightAndreas Kling
2023-01-03LibGfx: Adjust ClassicWindowTheme titlebar height calculationAndreas Kling
Use the Font::pixel_size() as reference, and put a little less vertical padding around the text at sizes above the palette limit.
2023-01-03LibGfx: Make ClassicWindowTheme menubar heights respect the font sizeAndreas Kling
2022-08-25LibGfx+LibGUI+WindowServer+Apps+Demos: Replace ToolWindowsthankyouverycool
with the RenderAbove WindowMode. This mode will ensure child windows always draw above their parents, even when focus is lost. RenderAbove modals are automatically themed the same as the old ToolWindows. Fixes ToolWindows rendering above ALL normal windows, regardless of parent. We can't rely on WindowType to create these sort of effects because of WindowManager's strict display hierarchy.
2022-08-01Userland+Base: Make the window titlebar font configurable separatelyAndreas Kling
Instead of defaulting to "bold variant of the system default font", let's allow the user to set any font they want as the titlebar font.
2022-04-09LibGfx: Move other font-related files to LibGfx/Font/Simon Wanner
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2022-03-17Libraries: Use default constructors/destructors in LibGfxLenny Maiorani
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-01-01Theming: Add alignment sectionFiliph Sandström
This commit removes the IsTitleCenter property and replaces it with the TitleAlignment property that supports "Left", "Right" & "Center".
2022-01-01LibGfx: Add window border/title theming optionsFiliph Sandström
This commit adds support the following properties to theming: Flags: - IsTitleCenter: true if the title should be centered. Metrics: - BorderThickness: The border width. - BorderRadius: The border corner radius.
2021-11-11Everywhere: Pass AK::StringView by valueAndreas Kling
2021-05-20LibGfx: Remove Gfx::FontDatabase::default_bold_font()Andreas Kling
Instead use default_font().bold_variant() in cases where we want a bold variant of the default font. :^)
2021-05-10WindowServer: Compute final window title before passing to WM clientsAndreas Kling
We were not substituting the window modified marker ("[*]") in the title strings we were sending to WM clients. This caused the Taskbar to show pre-substitution window titles for the Text Editor application. This patch moves the window title resolution to Window::compute_title() which is then used throughout.
2021-05-02LibGfx: Unify Rect, Point, and SizeMatthew Olsson
This commit unifies methods and method/param names between the above classes, as well as adds [[nodiscard]] and ALWAYS_INLINE where appropriate. It also renamed the various move_by methods to translate_by, as that more closely matches the transformation terminology.
2021-05-01WindowServer+LibGfx: Automatic "modified" markers in window titlesAndreas Kling
You can now add the string "[*]" to a window title and it will be replaced with " (*)" if the window is modified, and with "" otherwise.
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
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-18Everywhere: Rename title_bar => titlebarAndreas Kling
2021-03-31WindowServer+LibGfx: Rename menu_bar => menubarAndreas Kling
We had a mix of "menu_bar" and "menubar". Let's just use "menubar" everywhere since that feels the most natural to write.
2021-03-26WindowServer+LibGfx: Make menubar menus slightly largerAndreas Kling
Also make sure the left/right padding is equally large.
2021-03-25WindowServer+LibGfx: Show menus in windows! :^)Andreas Kling
This patch begins the transition away from the global menu towards per-window menus instead. The global menu looks neat, but has always felt clunky, and there are a number of usability problems with it, especially in programs with multiple windows. You can now call GUI::Window::set_menubar() to add a menubar to your window. It will be specific to that one window only.
2021-03-15LibGfx: Draw window frame icon scaled to title_bar_icon_rect()Linus Groh
Partially fixes #5806.
2021-02-23Everywhere: Rename ASSERT => VERIFYAndreas Kling
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED) Since all of these checks are done in release builds as well, let's rename them to VERIFY to prevent confusion, as everyone is used to assertions being compiled out in release. We can introduce a new ASSERT macro that is specifically for debug checks, but I'm doing this wholesale conversion first since we've accumulated thousands of these already, and it's not immediately obvious which ones are suitable for ASSERT.
2021-02-16LibGfx: Oops, fix misaligned window buttons for WindowType::NormalAndreas Kling
2021-02-16WindowServer+LibGUI+LibGfx: Add WindowType::ToolWindowAndreas Kling
Tool windows are secondary windows with a smaller title bar. The sit on the layer above normal windows, and cannot be minimized. These are intended for complex yet non-modal interactions with the content of a primary window, such as find/replace windows, property windows, etc.
2021-02-13WindowServer: Improvements to support alpha channel in window framesTom
This fixes some issues handling the alpha channel that may be present in rendered window frames. Fixes #5303
2021-01-12Libraries: Move to Userland/Libraries/Andreas Kling