mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibGfx: Add window border/title theming options
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.
This commit is contained in:
committed by
Andreas Kling
parent
14b2656107
commit
8a1d77f65c
Notes:
sideshowbarker
2024-07-17 21:51:02 +09:00
Author: https://github.com/filiphsps Commit: https://github.com/SerenityOS/serenity/commit/8a1d77f65cd
@@ -49,6 +49,10 @@ Core::AnonymousBuffer load_system_theme(Core::ConfigFile const& file)
|
||||
int metric = file.read_num_entry("Metrics", name, -1);
|
||||
if (metric == -1) {
|
||||
switch (role) {
|
||||
case (int)MetricRole::BorderThickness:
|
||||
return 4;
|
||||
case (int)MetricRole::BorderRadius:
|
||||
return 0;
|
||||
case (int)MetricRole::TitleHeight:
|
||||
return 19;
|
||||
case (int)MetricRole::TitleButtonHeight:
|
||||
|
||||
Reference in New Issue
Block a user