summaryrefslogtreecommitdiff
path: root/src/app.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-08-16 18:56:01 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-08-16 18:56:01 +0300
commit69ea47be1cee7298b65db8104f1c88e51554ba48 (patch)
treebf4cf799be4d9ceacec548edcd1eff30db92d757 /src/app.c
parent6d8bf2508f5e2af36b61cca42ed68cad26c41d56 (diff)
Added Pure Black and Pure White themes
Font changes cause window redrawing to pause so document layout doesn’t get an intermediate update with a different width. Sheets are mouse-modal.
Diffstat (limited to 'src/app.c')
-rw-r--r--src/app.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/app.c b/src/app.c
index 919a17fa..670adee2 100644
--- a/src/app.c
+++ b/src/app.c
@@ -263,7 +263,7 @@ static void init_App_(iApp *d, int argc, char **argv) {
263 if (!loadState_App_(d)) { 263 if (!loadState_App_(d)) {
264 postCommand_App("navigate.home"); 264 postCommand_App("navigate.home");
265 } 265 }
266 postCommand_App("window.unblank"); 266 postCommand_App("window.unfreeze");
267} 267}
268 268
269static void deinit_App(iApp *d) { 269static void deinit_App(iApp *d) {
@@ -612,13 +612,15 @@ iBool handleCommand_App(const char *cmd) {
612 return iTrue; 612 return iTrue;
613 } 613 }
614 else if (equal_Command(cmd, "zoom.set")) { 614 else if (equal_Command(cmd, "zoom.set")) {
615 setFreezeDraw_Window(get_Window(), iTrue); /* no intermediate draws before docs updated */
615 d->zoomPercent = arg_Command(cmd); 616 d->zoomPercent = arg_Command(cmd);
616 setContentFontSize_Text((float) d->zoomPercent / 100.0f); 617 setContentFontSize_Text((float) d->zoomPercent / 100.0f);
617 postCommand_App("font.changed"); 618 postCommand_App("font.changed");
618 refresh_App(); 619 postCommand_App("window.unfreeze");
619 return iTrue; 620 return iTrue;
620 } 621 }
621 else if (equal_Command(cmd, "zoom.delta")) { 622 else if (equal_Command(cmd, "zoom.delta")) {
623 setFreezeDraw_Window(get_Window(), iTrue); /* no intermediate draws before docs updated */
622 int delta = arg_Command(cmd); 624 int delta = arg_Command(cmd);
623 if (d->zoomPercent < 100 || (delta < 0 && d->zoomPercent == 100)) { 625 if (d->zoomPercent < 100 || (delta < 0 && d->zoomPercent == 100)) {
624 delta /= 2; 626 delta /= 2;
@@ -626,7 +628,7 @@ iBool handleCommand_App(const char *cmd) {
626 d->zoomPercent = iClamp(d->zoomPercent + delta, 50, 200); 628 d->zoomPercent = iClamp(d->zoomPercent + delta, 50, 200);
627 setContentFontSize_Text((float) d->zoomPercent / 100.0f); 629 setContentFontSize_Text((float) d->zoomPercent / 100.0f);
628 postCommand_App("font.changed"); 630 postCommand_App("font.changed");
629 refresh_App(); 631 postCommand_App("window.unfreeze");
630 return iTrue; 632 return iTrue;
631 } 633 }
632 else if (equal_Command(cmd, "bookmark.add")) { 634 else if (equal_Command(cmd, "bookmark.add")) {