diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-06-10 12:03:10 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-06-10 12:03:10 +0300 |
commit | 77ecd8cb2fec2c61f37f4c5561b18fad6fe6137a (patch) | |
tree | b2d9087b225ea0bb568c4f80818d0513736a771d | |
parent | 99044467586a5a37c796a7786834359dfaf30a2c (diff) |
Tight mode for Query/Feeds indicator
-rw-r--r-- | po/en.po | 6 | ||||
-rw-r--r-- | res/lang/de.bin | bin | 20699 -> 20768 bytes | |||
-rw-r--r-- | res/lang/en.bin | bin | 19404 -> 19473 bytes | |||
-rw-r--r-- | res/lang/es.bin | bin | 21778 -> 21847 bytes | |||
-rw-r--r-- | res/lang/fi.bin | bin | 21901 -> 21970 bytes | |||
-rw-r--r-- | res/lang/fr.bin | bin | 22311 -> 22380 bytes | |||
-rw-r--r-- | res/lang/ia.bin | bin | 21609 -> 21678 bytes | |||
-rw-r--r-- | res/lang/ie.bin | bin | 21167 -> 21236 bytes | |||
-rw-r--r-- | res/lang/pl.bin | bin | 22415 -> 22484 bytes | |||
-rw-r--r-- | res/lang/ru.bin | bin | 32646 -> 32715 bytes | |||
-rw-r--r-- | res/lang/sr.bin | bin | 32051 -> 32120 bytes | |||
-rw-r--r-- | res/lang/tok.bin | bin | 19792 -> 19861 bytes | |||
-rw-r--r-- | res/lang/zh_Hans.bin | bin | 18568 -> 18637 bytes | |||
-rw-r--r-- | res/lang/zh_Hant.bin | bin | 18753 -> 18822 bytes | |||
-rw-r--r-- | src/app.c | 8 | ||||
-rw-r--r-- | src/ui/labelwidget.c | 5 | ||||
-rw-r--r-- | src/ui/labelwidget.h | 2 | ||||
-rw-r--r-- | src/ui/root.c | 16 | ||||
-rw-r--r-- | src/ui/util.c | 4 |
19 files changed, 33 insertions, 8 deletions
@@ -392,6 +392,9 @@ msgstr "Find text on page" | |||
392 | msgid "status.query" | 392 | msgid "status.query" |
393 | msgstr "Search Query" | 393 | msgstr "Search Query" |
394 | 394 | ||
395 | msgid "status.query.tight" | ||
396 | msgstr "Query" | ||
397 | |||
395 | msgid "status.feeds" | 398 | msgid "status.feeds" |
396 | msgstr "Updating Feeds" | 399 | msgstr "Updating Feeds" |
397 | 400 | ||
@@ -1228,6 +1231,9 @@ msgstr "On Light" | |||
1228 | msgid "prefs.userfont" | 1231 | msgid "prefs.userfont" |
1229 | msgstr "Symbol font:" | 1232 | msgstr "Symbol font:" |
1230 | 1233 | ||
1234 | msgid "hint.prefs.userfont" | ||
1235 | msgstr "path of a TrueType font" | ||
1236 | |||
1231 | msgid "prefs.linewidth" | 1237 | msgid "prefs.linewidth" |
1232 | msgstr "Line width:" | 1238 | msgstr "Line width:" |
1233 | 1239 | ||
diff --git a/res/lang/de.bin b/res/lang/de.bin index b89c8b0f..95d172cc 100644 --- a/res/lang/de.bin +++ b/res/lang/de.bin | |||
Binary files differ | |||
diff --git a/res/lang/en.bin b/res/lang/en.bin index 0ac42d88..d5cb1c2c 100644 --- a/res/lang/en.bin +++ b/res/lang/en.bin | |||
Binary files differ | |||
diff --git a/res/lang/es.bin b/res/lang/es.bin index 8f3940f1..4b567393 100644 --- a/res/lang/es.bin +++ b/res/lang/es.bin | |||
Binary files differ | |||
diff --git a/res/lang/fi.bin b/res/lang/fi.bin index d19dc0e8..d1ab756b 100644 --- a/res/lang/fi.bin +++ b/res/lang/fi.bin | |||
Binary files differ | |||
diff --git a/res/lang/fr.bin b/res/lang/fr.bin index 0b78f3b7..5561640c 100644 --- a/res/lang/fr.bin +++ b/res/lang/fr.bin | |||
Binary files differ | |||
diff --git a/res/lang/ia.bin b/res/lang/ia.bin index e6590afc..da272056 100644 --- a/res/lang/ia.bin +++ b/res/lang/ia.bin | |||
Binary files differ | |||
diff --git a/res/lang/ie.bin b/res/lang/ie.bin index f852ba0e..3d77d90e 100644 --- a/res/lang/ie.bin +++ b/res/lang/ie.bin | |||
Binary files differ | |||
diff --git a/res/lang/pl.bin b/res/lang/pl.bin index 9f42024c..c09c6bef 100644 --- a/res/lang/pl.bin +++ b/res/lang/pl.bin | |||
Binary files differ | |||
diff --git a/res/lang/ru.bin b/res/lang/ru.bin index 5c9e3488..e344e992 100644 --- a/res/lang/ru.bin +++ b/res/lang/ru.bin | |||
Binary files differ | |||
diff --git a/res/lang/sr.bin b/res/lang/sr.bin index f4239f1f..6a860e79 100644 --- a/res/lang/sr.bin +++ b/res/lang/sr.bin | |||
Binary files differ | |||
diff --git a/res/lang/tok.bin b/res/lang/tok.bin index 1a6b5baf..27bfdb49 100644 --- a/res/lang/tok.bin +++ b/res/lang/tok.bin | |||
Binary files differ | |||
diff --git a/res/lang/zh_Hans.bin b/res/lang/zh_Hans.bin index b155036d..077ba1e3 100644 --- a/res/lang/zh_Hans.bin +++ b/res/lang/zh_Hans.bin | |||
Binary files differ | |||
diff --git a/res/lang/zh_Hant.bin b/res/lang/zh_Hant.bin index 57ce2d83..4d9a984b 100644 --- a/res/lang/zh_Hant.bin +++ b/res/lang/zh_Hant.bin | |||
Binary files differ | |||
@@ -2503,11 +2503,15 @@ iBool handleCommand_App(const char *cmd) { | |||
2503 | return iTrue; | 2503 | return iTrue; |
2504 | } | 2504 | } |
2505 | else if (equal_Command(cmd, "feeds.update.started")) { | 2505 | else if (equal_Command(cmd, "feeds.update.started")) { |
2506 | showCollapsed_Widget(findWidget_App("feeds.progress"), iTrue); | 2506 | iAnyObject *prog = findWidget_Root("feeds.progress"); |
2507 | const iWidget *navBar = findWidget_Root("navbar"); | ||
2508 | updateTextAndResizeWidthCStr_LabelWidget( | ||
2509 | prog, flags_Widget(navBar) & tight_WidgetFlag ? "\u2605" : "\u2605 ${status.feeds}"); | ||
2510 | showCollapsed_Widget(prog, iTrue); | ||
2507 | return iFalse; | 2511 | return iFalse; |
2508 | } | 2512 | } |
2509 | else if (equal_Command(cmd, "feeds.update.finished")) { | 2513 | else if (equal_Command(cmd, "feeds.update.finished")) { |
2510 | showCollapsed_Widget(findWidget_App("feeds.progress"), iFalse); | 2514 | showCollapsed_Widget(findWidget_Root("feeds.progress"), iFalse); |
2511 | refreshFinished_Feeds(); | 2515 | refreshFinished_Feeds(); |
2512 | postRefresh_App(); | 2516 | postRefresh_App(); |
2513 | return iFalse; | 2517 | return iFalse; |
diff --git a/src/ui/labelwidget.c b/src/ui/labelwidget.c index ed023961..febaa15b 100644 --- a/src/ui/labelwidget.c +++ b/src/ui/labelwidget.c | |||
@@ -495,6 +495,11 @@ void updateTextCStr_LabelWidget(iLabelWidget *d, const char *text) { | |||
495 | refresh_Widget(&d->widget); | 495 | refresh_Widget(&d->widget); |
496 | } | 496 | } |
497 | 497 | ||
498 | void updateTextAndResizeWidthCStr_LabelWidget(iLabelWidget *d, const char *text) { | ||
499 | updateTextCStr_LabelWidget(d, text); | ||
500 | d->widget.rect.size.x = defaultSize_LabelWidget(d).x; | ||
501 | } | ||
502 | |||
498 | void setTextCStr_LabelWidget(iLabelWidget *d, const char *text) { | 503 | void setTextCStr_LabelWidget(iLabelWidget *d, const char *text) { |
499 | setCStr_String(&d->label, text); | 504 | setCStr_String(&d->label, text); |
500 | set_String(&d->srcLabel, &d->label); | 505 | set_String(&d->srcLabel, &d->label); |
diff --git a/src/ui/labelwidget.h b/src/ui/labelwidget.h index e38a1dc8..25cde95c 100644 --- a/src/ui/labelwidget.h +++ b/src/ui/labelwidget.h | |||
@@ -43,6 +43,8 @@ void updateSize_LabelWidget (iLabelWidget *); | |||
43 | void updateText_LabelWidget (iLabelWidget *, const iString *text); /* not resized */ | 43 | void updateText_LabelWidget (iLabelWidget *, const iString *text); /* not resized */ |
44 | void updateTextCStr_LabelWidget (iLabelWidget *, const char *text); /* not resized */ | 44 | void updateTextCStr_LabelWidget (iLabelWidget *, const char *text); /* not resized */ |
45 | 45 | ||
46 | void updateTextAndResizeWidthCStr_LabelWidget (iLabelWidget *, const char *text); | ||
47 | |||
46 | iInt2 defaultSize_LabelWidget (const iLabelWidget *); | 48 | iInt2 defaultSize_LabelWidget (const iLabelWidget *); |
47 | int font_LabelWidget (const iLabelWidget *); | 49 | int font_LabelWidget (const iLabelWidget *); |
48 | const iString * text_LabelWidget (const iLabelWidget *); | 50 | const iString * text_LabelWidget (const iLabelWidget *); |
diff --git a/src/ui/root.c b/src/ui/root.c index 15548e74..23a7d670 100644 --- a/src/ui/root.c +++ b/src/ui/root.c | |||
@@ -551,9 +551,15 @@ static void updateUrlInputContentPadding_(iWidget *navBar) { | |||
551 | } | 551 | } |
552 | 552 | ||
553 | static void showSearchQueryIndicator_(iBool show) { | 553 | static void showSearchQueryIndicator_(iBool show) { |
554 | iWidget *navBar = findWidget_Root("navbar"); | ||
554 | iWidget *indicator = findWidget_App("input.indicator.search"); | 555 | iWidget *indicator = findWidget_App("input.indicator.search"); |
556 | updateTextCStr_LabelWidget((iLabelWidget *) indicator, | ||
557 | flags_Widget(navBar) & tight_WidgetFlag | ||
558 | ? "${status.query.tight} " return_Icon | ||
559 | : "${status.query} " return_Icon); | ||
560 | indicator->rect.size.x = defaultSize_LabelWidget((iLabelWidget *) indicator).x; /* don't touch height */ | ||
555 | showCollapsed_Widget(indicator, show); | 561 | showCollapsed_Widget(indicator, show); |
556 | updateUrlInputContentPadding_(findWidget_Root("navbar")); | 562 | updateUrlInputContentPadding_(navBar); |
557 | } | 563 | } |
558 | 564 | ||
559 | static int navBarAvailableSpace_(iWidget *navBar) { | 565 | static int navBarAvailableSpace_(iWidget *navBar) { |
@@ -1048,9 +1054,9 @@ void createUserInterface_Root(iRoot *d) { | |||
1048 | resizeHeightOfChildren_WidgetFlag | | 1054 | resizeHeightOfChildren_WidgetFlag | |
1049 | moveToParentRightEdge_WidgetFlag); | 1055 | moveToParentRightEdge_WidgetFlag); |
1050 | /* Feeds refresh indicator is inside the input field. */ { | 1056 | /* Feeds refresh indicator is inside the input field. */ { |
1051 | iLabelWidget *queryInd = | 1057 | iLabelWidget *queryInd = new_LabelWidget("${status.query} " return_Icon, NULL); |
1052 | new_LabelWidget(uiTextAction_ColorEscape "${status.query} " return_Icon, NULL); | ||
1053 | setId_Widget(as_Widget(queryInd), "input.indicator.search"); | 1058 | setId_Widget(as_Widget(queryInd), "input.indicator.search"); |
1059 | setTextColor_LabelWidget(queryInd, uiTextAction_ColorId); | ||
1054 | setBackgroundColor_Widget(as_Widget(queryInd), uiBackground_ColorId); | 1060 | setBackgroundColor_Widget(as_Widget(queryInd), uiBackground_ColorId); |
1055 | setFrameColor_Widget(as_Widget(queryInd), uiTextAction_ColorId); | 1061 | setFrameColor_Widget(as_Widget(queryInd), uiTextAction_ColorId); |
1056 | setAlignVisually_LabelWidget(queryInd, iTrue); | 1062 | setAlignVisually_LabelWidget(queryInd, iTrue); |
@@ -1060,9 +1066,9 @@ void createUserInterface_Root(iRoot *d) { | |||
1060 | collapse_WidgetFlag | hidden_WidgetFlag); | 1066 | collapse_WidgetFlag | hidden_WidgetFlag); |
1061 | } | 1067 | } |
1062 | /* Feeds refresh indicator is inside the input field. */ { | 1068 | /* Feeds refresh indicator is inside the input field. */ { |
1063 | iLabelWidget *fprog = new_LabelWidget(uiTextCaution_ColorEscape | 1069 | iLabelWidget *fprog = new_LabelWidget("", NULL); |
1064 | "\u2605 ${status.feeds}", NULL); | ||
1065 | setId_Widget(as_Widget(fprog), "feeds.progress"); | 1070 | setId_Widget(as_Widget(fprog), "feeds.progress"); |
1071 | setTextColor_LabelWidget(fprog, uiTextCaution_ColorId); | ||
1066 | setBackgroundColor_Widget(as_Widget(fprog), uiBackground_ColorId); | 1072 | setBackgroundColor_Widget(as_Widget(fprog), uiBackground_ColorId); |
1067 | setAlignVisually_LabelWidget(fprog, iTrue); | 1073 | setAlignVisually_LabelWidget(fprog, iTrue); |
1068 | setNoAutoMinHeight_LabelWidget(fprog, iTrue); | 1074 | setNoAutoMinHeight_LabelWidget(fprog, iTrue); |
diff --git a/src/ui/util.c b/src/ui/util.c index c4fb8886..6eef544b 100644 --- a/src/ui/util.c +++ b/src/ui/util.c | |||
@@ -1789,7 +1789,9 @@ iWidget *makePreferences_Widget(void) { | |||
1789 | updateSize_LabelWidget((iLabelWidget *) tog); | 1789 | updateSize_LabelWidget((iLabelWidget *) tog); |
1790 | } | 1790 | } |
1791 | addChildFlags_Widget(values, iClob(boldLink), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag); | 1791 | addChildFlags_Widget(values, iClob(boldLink), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag); |
1792 | addPrefsInputWithHeading_(headings, values, "prefs.userfont", iClob(new_InputWidget(0))); | 1792 | iInputWidget *customFont = new_InputWidget(0); |
1793 | setHint_InputWidget(customFont, "${hint.prefs.userfont}"); | ||
1794 | addPrefsInputWithHeading_(headings, values, "prefs.userfont", iClob(customFont)); | ||
1793 | } | 1795 | } |
1794 | makeTwoColumnHeading_("${heading.prefs.paragraph}", headings, values); | 1796 | makeTwoColumnHeading_("${heading.prefs.paragraph}", headings, values); |
1795 | addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.linewidth}"))); | 1797 | addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.linewidth}"))); |