1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 10:05:10 +00:00

HackStudio: Draw a brownish frame around the current editor widget

Also make the editor filename label bold only for the current editor.
This commit is contained in:
Andreas Kling 2019-10-27 20:43:34 +01:00
parent e2d7f585da
commit e2c74762ff
4 changed files with 50 additions and 2 deletions

View file

@ -20,7 +20,6 @@ EditorWrapper::EditorWrapper(GWidget* parent)
label_wrapper->layout()->set_margins({ 2, 0, 2, 0 });
m_filename_label = GLabel::construct("(Untitled)", label_wrapper);
m_filename_label->set_font(Font::default_bold_font());
m_filename_label->set_text_alignment(TextAlignment::CenterLeft);
m_filename_label->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
m_filename_label->set_preferred_size(0, 14);
@ -61,3 +60,8 @@ EditorWrapper::EditorWrapper(GWidget* parent)
EditorWrapper::~EditorWrapper()
{
}
void EditorWrapper::set_editor_has_focus(Badge<Editor>, bool focus)
{
m_filename_label->set_font(focus ? Font::default_bold_font() : Font::default_font());
}