1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:57:43 +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

@ -2,6 +2,8 @@
#include <LibGUI/GTextEditor.h>
class EditorWrapper;
class Editor final : public GTextEditor {
C_OBJECT(Editor)
public:
@ -9,8 +11,13 @@ public:
Function<void()> on_focus;
EditorWrapper& wrapper();
const EditorWrapper& wrapper() const;
private:
virtual void focusin_event(CEvent& event) override;
virtual void focusin_event(CEvent&) override;
virtual void focusout_event(CEvent&) override;
virtual void paint_event(GPaintEvent&) override;
Editor(GWidget* parent)
: GTextEditor(GTextEditor::MultiLine, parent)