summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-12-30 21:01:09 +0100
committerAndreas Kling <kling@serenityos.org>2020-12-30 21:01:28 +0100
commita68275914e6aa3cace70e33e3b27995191246290 (patch)
tree3083df09c359e8c6c3f96a2a0687553151cd34fb /Libraries/LibGUI
parentb4d13907148f2790482df5608b4e6c4ae6a68bc8 (diff)
downloadserenity-a68275914e6aa3cace70e33e3b27995191246290.zip
LibGUI: Tweak FontPicker layout
Make everything a bit smaller and hide the horizontal scrollbars in the list views since we don't really need them.
Diffstat (limited to 'Libraries/LibGUI')
-rw-r--r--Libraries/LibGUI/FontPicker.cpp8
-rw-r--r--Libraries/LibGUI/FontPickerDialog.gml6
2 files changed, 12 insertions, 2 deletions
diff --git a/Libraries/LibGUI/FontPicker.cpp b/Libraries/LibGUI/FontPicker.cpp
index 9204b47419..ba5d5e3c8d 100644
--- a/Libraries/LibGUI/FontPicker.cpp
+++ b/Libraries/LibGUI/FontPicker.cpp
@@ -30,6 +30,7 @@
#include <LibGUI/ItemListModel.h>
#include <LibGUI/Label.h>
#include <LibGUI/ListView.h>
+#include <LibGUI/ScrollBar.h>
#include <LibGUI/Widget.h>
#include <LibGfx/FontDatabase.h>
@@ -40,7 +41,7 @@ FontPicker::FontPicker(Window* parent_window, const Gfx::Font* current_font, boo
, m_fixed_width_only(fixed_width_only)
{
set_title("Font picker");
- resize(540, 300);
+ resize(430, 280);
set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-font-editor.png"));
auto& widget = set_main_widget<GUI::Widget>();
@@ -50,6 +51,11 @@ FontPicker::FontPicker(Window* parent_window, const Gfx::Font* current_font, boo
m_family_list_view = static_cast<ListView&>(*widget.find_descendant_by_name("family_list_view"));
m_weight_list_view = static_cast<ListView&>(*widget.find_descendant_by_name("weight_list_view"));
m_size_list_view = static_cast<ListView&>(*widget.find_descendant_by_name("size_list_view"));
+
+ m_family_list_view->horizontal_scrollbar().set_visible(false);
+ m_weight_list_view->horizontal_scrollbar().set_visible(false);
+ m_size_list_view->horizontal_scrollbar().set_visible(false);
+
m_sample_text_label = static_cast<Label&>(*widget.find_descendant_by_name("sample_text_label"));
HashTable<String> families;
diff --git a/Libraries/LibGUI/FontPickerDialog.gml b/Libraries/LibGUI/FontPickerDialog.gml
index fb30a3631a..8f45fb0627 100644
--- a/Libraries/LibGUI/FontPickerDialog.gml
+++ b/Libraries/LibGUI/FontPickerDialog.gml
@@ -25,6 +25,8 @@
}
@GUI::Widget {
+ fixed_width: 100
+
layout: @GUI::VerticalBoxLayout {
}
@@ -40,6 +42,8 @@
}
@GUI::Widget {
+ fixed_width: 80
+
layout: @GUI::VerticalBoxLayout {
}
@@ -60,7 +64,7 @@
}
title: "Sample text"
- fixed_height: 100
+ fixed_height: 80
@GUI::Label {
name: "sample_text_label"