diff options
author | Andreas Kling <kling@serenityos.org> | 2020-05-18 16:41:29 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-18 16:48:54 +0200 |
commit | 22cd861c7e8080b0c6c2d7a2d601c58773e70df6 (patch) | |
tree | 433cfa084bdb90593c39c4c8921a8b77a5a3c6bf /Applications/Calculator/CalculatorWidget.cpp | |
parent | a6e21257279443e94f4258404035a9c13c4d44e1 (diff) | |
download | serenity-22cd861c7e8080b0c6c2d7a2d601c58773e70df6.zip |
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.
Diffstat (limited to 'Applications/Calculator/CalculatorWidget.cpp')
-rw-r--r-- | Applications/Calculator/CalculatorWidget.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Applications/Calculator/CalculatorWidget.cpp b/Applications/Calculator/CalculatorWidget.cpp index a51251dc48..bc76b576cf 100644 --- a/Applications/Calculator/CalculatorWidget.cpp +++ b/Applications/Calculator/CalculatorWidget.cpp @@ -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); |