mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 12:58:13 +00:00
LibGUI: Add a GUI::FontPicker dialog class :^)
This allows you to pick & choose a font by selecting the family, weight and size you want. It shows you a nice preview sentence and everything.
This commit is contained in:
parent
aacab897e8
commit
ddaa526769
4 changed files with 336 additions and 0 deletions
91
Libraries/LibGUI/FontPickerDialog.gml
Normal file
91
Libraries/LibGUI/FontPickerDialog.gml
Normal file
|
@ -0,0 +1,91 @@
|
|||
@GUI::Widget {
|
||||
fill_with_background_color: true
|
||||
|
||||
layout: @GUI::VerticalBoxLayout {
|
||||
margins: [4, 4, 4, 4]
|
||||
}
|
||||
|
||||
@GUI::Widget {
|
||||
layout: @GUI::HorizontalBoxLayout {
|
||||
}
|
||||
|
||||
@GUI::Widget {
|
||||
layout: @GUI::VerticalBoxLayout {
|
||||
}
|
||||
|
||||
@GUI::Label {
|
||||
text: "Family:"
|
||||
text_alignment: "CenterLeft"
|
||||
fixed_height: 16
|
||||
}
|
||||
|
||||
@GUI::ListView {
|
||||
name: "family_list_view"
|
||||
}
|
||||
}
|
||||
|
||||
@GUI::Widget {
|
||||
layout: @GUI::VerticalBoxLayout {
|
||||
}
|
||||
|
||||
@GUI::Label {
|
||||
text: "Weight:"
|
||||
text_alignment: "CenterLeft"
|
||||
fixed_height: 16
|
||||
}
|
||||
|
||||
@GUI::ListView {
|
||||
name: "weight_list_view"
|
||||
}
|
||||
}
|
||||
|
||||
@GUI::Widget {
|
||||
layout: @GUI::VerticalBoxLayout {
|
||||
}
|
||||
|
||||
@GUI::Label {
|
||||
text: "Size:"
|
||||
text_alignment: "CenterLeft"
|
||||
fixed_height: 16
|
||||
}
|
||||
|
||||
@GUI::ListView {
|
||||
name: "size_list_view"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@GUI::GroupBox {
|
||||
layout: @GUI::VerticalBoxLayout {
|
||||
}
|
||||
|
||||
title: "Sample text"
|
||||
fixed_height: 100
|
||||
|
||||
@GUI::Label {
|
||||
name: "sample_text_label"
|
||||
text: "The quick brown fox jumps over the lazy dog."
|
||||
}
|
||||
}
|
||||
|
||||
@GUI::Widget {
|
||||
fixed_height: 22
|
||||
layout: @GUI::HorizontalBoxLayout {
|
||||
}
|
||||
|
||||
@GUI::Widget {
|
||||
}
|
||||
|
||||
@GUI::Button {
|
||||
name: "ok_button"
|
||||
text: "OK"
|
||||
fixed_width: 80
|
||||
}
|
||||
|
||||
@GUI::Button {
|
||||
name: "cancel_button"
|
||||
text: "Cancel"
|
||||
fixed_width: 80
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue