1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 07:28:11 +00:00

DisplaySettings: Update Workspaces tab GML

Removes some verbiage and arranges things consistent with other
settings dialogs.

Ideally we shouldn't litter UIs with shortcuts, tips, tricks,
self-evident or redundant descriptions, etc, so this can be
refined again in the future once there's an official way to expose/
customize keyboard shortcuts.
This commit is contained in:
thankyouverycool 2022-08-16 08:08:30 -04:00 committed by Andreas Kling
parent 2d706ba753
commit 71a437b512
2 changed files with 48 additions and 49 deletions

View file

@ -5,69 +5,65 @@
}
@GUI::GroupBox {
layout: @GUI::VerticalBoxLayout {
margins: [14, 14, 4]
}
title: "Workspaces"
shrink_to_fit: true
@GUI::Widget {
fixed_height: 32
layout: @GUI::HorizontalBoxLayout {
margins: [6]
}
@GUI::Label {
text: "Rows:"
text_alignment: "CenterRight"
}
@GUI::SpinBox {
name: "workspace_rows_spinbox"
min: 1
max: 16
orientation: "Horizontal"
}
@GUI::Label {
text: "Columns:"
text_alignment: "CenterRight"
}
@GUI::SpinBox {
name: "workspace_columns_spinbox"
min: 1
max: 16
orientation: "Horizontal"
}
title: "Layout"
preferred_height: "shrink"
layout: @GUI::HorizontalBoxLayout {
margins: [8]
spacing: 2
}
@GUI::Widget {
fixed_height: 76
layout: @GUI::HorizontalBoxLayout {}
fixed_width: 32
layout: @GUI::VerticalBoxLayout {}
@GUI::Label {
fixed_height: 32
fixed_width: 32
icon: "/res/icons/32x32/app-welcome.png"
@GUI::ImageWidget {
bitmap: "/res/icons/32x32/workspaces.png"
}
@GUI::Layout::Spacer {}
}
@GUI::Widget {
layout: @GUI::VerticalBoxLayout {
margins: [4, 0, 0, 16]
spacing: 10
}
@GUI::Widget {
layout: @GUI::VerticalBoxLayout {
margins: [6]
layout: @GUI::HorizontalBoxLayout {
spacing: 8
}
@GUI::Label {
text: "Use the Ctrl+Alt+Arrow hotkeys to move between workspaces."
text_alignment: "TopLeft"
word_wrap: true
text: "Rows:"
autosize: true
}
@GUI::SpinBox {
name: "workspace_rows_spinbox"
min: 1
max: 16
}
@GUI::Widget {
fixed_width: 8
}
@GUI::Label {
text: "Use the Ctrl+Shift+Alt+Arrow hotkeys to move between\nworkspaces and move the active window."
text_alignment: "TopLeft"
word_wrap: true
text: "Columns:"
autosize: true
}
@GUI::SpinBox {
name: "workspace_columns_spinbox"
min: 1
max: 16
}
}
@GUI::Label {
name: "keyboard_shortcuts_label"
text_alignment: "CenterLeft"
}
}
}

View file

@ -33,6 +33,9 @@ void DesktopSettingsWidget::create_frame()
m_workspace_columns_spinbox->on_change = [&](auto) {
set_modified(true);
};
auto& keyboard_shortcuts_label = *find_descendant_of_type_named<GUI::Label>("keyboard_shortcuts_label");
keyboard_shortcuts_label.set_text("\xE2\x84\xB9\tCtrl+Alt+{Shift}+Arrows moves between workspaces");
}
void DesktopSettingsWidget::load_current_settings()