mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-07 19:57:45 +03:00
Calculator: Set a fixed-width font on the text box
GUI::TextEditor does not yet support right-aligned variable-width fonts so just switch this to a fixed-width font for now.
This commit is contained in:
parent
a6e2125727
commit
22cd861c7e
Notes:
sideshowbarker
2024-07-19 06:29:51 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/22cd861c7e8
@ -29,6 +29,7 @@
|
||||
#include <LibGUI/Button.h>
|
||||
#include <LibGUI/Label.h>
|
||||
#include <LibGUI/TextBox.h>
|
||||
#include <LibGfx/Font.h>
|
||||
|
||||
CalculatorWidget::CalculatorWidget()
|
||||
{
|
||||
@ -37,6 +38,7 @@ CalculatorWidget::CalculatorWidget()
|
||||
m_entry = add<GUI::TextBox>();
|
||||
m_entry->set_relative_rect(5, 5, 244, 26);
|
||||
m_entry->set_text_alignment(Gfx::TextAlignment::CenterRight);
|
||||
m_entry->set_font(Gfx::Font::default_fixed_width_font());
|
||||
|
||||
m_label = add<GUI::Label>();
|
||||
m_label->set_relative_rect(12, 42, 27, 27);
|
||||
|
Loading…
Reference in New Issue
Block a user