mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-02-04 08:55:21 -05:00
Move initializer from .hpp -> .cpp file (#1213)
This commit is contained in:
parent
b28b96fb4a
commit
8dbcefbc75
@ -251,6 +251,15 @@ void TextViewer::reset_file(FileWrapper* file) {
|
|||||||
redraw(true);
|
redraw(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TextViewer::set_font_zoom(bool zoom) {
|
||||||
|
font_zoom = zoom;
|
||||||
|
font_style = font_zoom ? &Styles::white : &Styles::white_small;
|
||||||
|
char_height = style().font.line_height();
|
||||||
|
char_width = style().font.char_width();
|
||||||
|
max_line = (uint8_t)(parent_rect().height() / char_height);
|
||||||
|
max_col = (uint8_t)(parent_rect().width() / char_width);
|
||||||
|
}
|
||||||
|
|
||||||
/* TextEditorMenu ***************************************************/
|
/* TextEditorMenu ***************************************************/
|
||||||
|
|
||||||
TextEditorMenu::TextEditorMenu()
|
TextEditorMenu::TextEditorMenu()
|
||||||
|
@ -76,16 +76,7 @@ class TextViewer : public Widget {
|
|||||||
uint16_t line_length();
|
uint16_t line_length();
|
||||||
|
|
||||||
const Style& style() { return *font_style; }
|
const Style& style() { return *font_style; }
|
||||||
|
void set_font_zoom(bool zoom);
|
||||||
void set_font_zoom(bool zoom) {
|
|
||||||
font_zoom = zoom;
|
|
||||||
font_style = font_zoom ? &Styles::white : &Styles::white_small;
|
|
||||||
char_height = style().font.line_height();
|
|
||||||
char_width = style().font.char_width();
|
|
||||||
max_line = (uint8_t)(parent_rect().height() / char_height);
|
|
||||||
max_col = (uint8_t)(parent_rect().width() / char_width);
|
|
||||||
}
|
|
||||||
|
|
||||||
void toggle_font_zoom() { set_font_zoom(!font_zoom); };
|
void toggle_font_zoom() { set_font_zoom(!font_zoom); };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user