1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 18:10:56 +09:00

HackStudio: Display warning when opening binary files

We now detect and display a warning when we can't render the text of an
opened file.

Closes #5062.
This commit is contained in:
Itamar 2021-03-19 13:06:32 +02:00 committed by Andreas Kling
parent 3cc7b00e24
commit dee0c46c9b
Notes: sideshowbarker 2024-07-18 21:12:16 +09:00
5 changed files with 35 additions and 4 deletions

View file

@ -42,6 +42,7 @@ public:
}
const String& name() const { return m_name; }
bool could_render_text() const { return m_could_render_text; }
GUI::TextDocument& document() const;
CodeDocument& code_document() const;
@ -57,6 +58,7 @@ private:
String m_name;
mutable RefPtr<CodeDocument> m_document;
mutable bool m_could_render_text { false };
int m_vertical_scroll_value { 0 };
int m_horizontal_scroll_value { 0 };
};