mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:47:44 +00: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
1 changed files with 2 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue