summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ui/sidebarwidget.c6
-rw-r--r--src/ui/text.c6
-rw-r--r--src/ui/text.h8
3 files changed, 10 insertions, 10 deletions
diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c
index de576f72..3fbcccd3 100644
--- a/src/ui/sidebarwidget.c
+++ b/src/ui/sidebarwidget.c
@@ -167,7 +167,7 @@ void setMode_SidebarWidget(iSidebarWidget *d, enum iSidebarMode mode) {
167 setFlags_Widget(as_Widget(d->modeButtons[i]), selected_WidgetFlag, i == d->mode); 167 setFlags_Widget(as_Widget(d->modeButtons[i]), selected_WidgetFlag, i == d->mode);
168 } 168 }
169 const float heights[max_SidebarMode] = { 1.5f, 3, 3, 1.2f }; 169 const float heights[max_SidebarMode] = { 1.5f, 3, 3, 1.2f };
170 d->itemHeight = heights[mode] * lineHeight_Text(default_FontId); 170 d->itemHeight = heights[mode] * lineHeight_Text(uiContent_FontId);
171} 171}
172 172
173enum iSidebarMode mode_SidebarWidget(const iSidebarWidget *d) { 173enum iSidebarMode mode_SidebarWidget(const iSidebarWidget *d) {
@@ -217,7 +217,7 @@ void init_SidebarWidget(iSidebarWidget *d) {
217 frameless_WidgetFlag | expand_WidgetFlag); 217 frameless_WidgetFlag | expand_WidgetFlag);
218 d->maxButtonLabelWidth = 218 d->maxButtonLabelWidth =
219 iMaxi(d->maxButtonLabelWidth, 219 iMaxi(d->maxButtonLabelWidth,
220 3 * gap_UI + measure_Text(default_FontId, normalModeLabels_[i]).x); 220 3 * gap_UI + measure_Text(uiLabel_FontId, normalModeLabels_[i]).x);
221 } 221 }
222 addChild_Widget(w, iClob(d->scroll = new_ScrollWidget())); 222 addChild_Widget(w, iClob(d->scroll = new_ScrollWidget()));
223 setThumb_ScrollWidget(d->scroll, 0, 0); 223 setThumb_ScrollWidget(d->scroll, 0, 0);
@@ -501,7 +501,7 @@ static void draw_SidebarWidget_(const iSidebarWidget *d) {
501 d->mode == documentOutline_SidebarMode ? tmBackground_ColorId 501 d->mode == documentOutline_SidebarMode ? tmBackground_ColorId
502 : uiBackground_ColorId); 502 : uiBackground_ColorId);
503 /* Draw the items. */ { 503 /* Draw the items. */ {
504 const int font = default_FontId; 504 const int font = uiContent_FontId;
505 const iRanges visRange = visRange_SidebarWidget_(d); 505 const iRanges visRange = visRange_SidebarWidget_(d);
506 iInt2 pos = addY_I2(topLeft_Rect(bounds), -(d->scrollY % d->itemHeight)); 506 iInt2 pos = addY_I2(topLeft_Rect(bounds), -(d->scrollY % d->itemHeight));
507 for (size_t i = visRange.start; i < visRange.end; i++) { 507 for (size_t i = visRange.start; i < visRange.end; i++) {
diff --git a/src/ui/text.c b/src/ui/text.c
index 52af34bb..1e702eee 100644
--- a/src/ui/text.c
+++ b/src/ui/text.c
@@ -120,7 +120,7 @@ static void initFonts_Text_(iText *d) {
120 int symbolsFont; 120 int symbolsFont;
121 } fontData[max_FontId] = { 121 } fontData[max_FontId] = {
122 { &fontSourceSansProRegular_Embedded, fontSize_UI, defaultSymbols_FontId }, 122 { &fontSourceSansProRegular_Embedded, fontSize_UI, defaultSymbols_FontId },
123 { &fontSourceSansProRegular_Embedded, fontSize_UI * 1.666f, defaultLargeSymbols_FontId }, 123 { &fontSourceSansProRegular_Embedded, fontSize_UI * 1.150f, defaultMediumSymbols_FontId },
124 { &fontFiraMonoRegular_Embedded, fontSize_UI * 0.866f, defaultSymbols_FontId }, 124 { &fontFiraMonoRegular_Embedded, fontSize_UI * 0.866f, defaultSymbols_FontId },
125 { &fontFiraSansRegular_Embedded, textSize, symbols_FontId }, 125 { &fontFiraSansRegular_Embedded, textSize, symbols_FontId },
126 { &fontFiraMonoRegular_Embedded, textSize * 0.866f, smallSymbols_FontId }, 126 { &fontFiraMonoRegular_Embedded, textSize * 0.866f, smallSymbols_FontId },
@@ -133,14 +133,14 @@ static void initFonts_Text_(iText *d) {
133 { &fontFiraSansBold_Embedded, textSize * 2.000f, hugeSymbols_FontId }, 133 { &fontFiraSansBold_Embedded, textSize * 2.000f, hugeSymbols_FontId },
134 { &fontFiraSansLight_Embedded, textSize * 1.666f, largeSymbols_FontId }, 134 { &fontFiraSansLight_Embedded, textSize * 1.666f, largeSymbols_FontId },
135 { &fontSymbola_Embedded, fontSize_UI, defaultSymbols_FontId }, 135 { &fontSymbola_Embedded, fontSize_UI, defaultSymbols_FontId },
136 { &fontSymbola_Embedded, fontSize_UI * 1.666f, defaultLargeSymbols_FontId }, 136 { &fontSymbola_Embedded, fontSize_UI * 1.150f, defaultMediumSymbols_FontId },
137 { &fontSymbola_Embedded, textSize, symbols_FontId }, 137 { &fontSymbola_Embedded, textSize, symbols_FontId },
138 { &fontSymbola_Embedded, textSize * 1.333f, mediumSymbols_FontId }, 138 { &fontSymbola_Embedded, textSize * 1.333f, mediumSymbols_FontId },
139 { &fontSymbola_Embedded, textSize * 1.666f, largeSymbols_FontId }, 139 { &fontSymbola_Embedded, textSize * 1.666f, largeSymbols_FontId },
140 { &fontSymbola_Embedded, textSize * 2.000f, hugeSymbols_FontId }, 140 { &fontSymbola_Embedded, textSize * 2.000f, hugeSymbols_FontId },
141 { &fontSymbola_Embedded, textSize * 0.866f, smallSymbols_FontId }, 141 { &fontSymbola_Embedded, textSize * 0.866f, smallSymbols_FontId },
142 { &fontNotoEmojiRegular_Embedded, fontSize_UI, defaultSymbols_FontId }, 142 { &fontNotoEmojiRegular_Embedded, fontSize_UI, defaultSymbols_FontId },
143 { &fontNotoEmojiRegular_Embedded, fontSize_UI * 1.666f, defaultLargeSymbols_FontId }, 143 { &fontNotoEmojiRegular_Embedded, fontSize_UI * 1.150f, defaultMediumSymbols_FontId },
144 { &fontNotoEmojiRegular_Embedded, textSize, symbols_FontId }, 144 { &fontNotoEmojiRegular_Embedded, textSize, symbols_FontId },
145 { &fontNotoEmojiRegular_Embedded, textSize * 1.333f, mediumSymbols_FontId }, 145 { &fontNotoEmojiRegular_Embedded, textSize * 1.333f, mediumSymbols_FontId },
146 { &fontNotoEmojiRegular_Embedded, textSize * 1.666f, largeSymbols_FontId }, 146 { &fontNotoEmojiRegular_Embedded, textSize * 1.666f, largeSymbols_FontId },
diff --git a/src/ui/text.h b/src/ui/text.h
index 85ab44e2..2d49a1a6 100644
--- a/src/ui/text.h
+++ b/src/ui/text.h
@@ -7,7 +7,7 @@
7 7
8enum iFontId { 8enum iFontId {
9 default_FontId, 9 default_FontId,
10 defaultLarge_FontId, 10 defaultMedium_FontId,
11 defaultMonospace_FontId, 11 defaultMonospace_FontId,
12 regular_FontId, 12 regular_FontId,
13 monospace_FontId, 13 monospace_FontId,
@@ -21,7 +21,7 @@ enum iFontId {
21 largeLight_FontId, 21 largeLight_FontId,
22 /* symbol fonts */ 22 /* symbol fonts */
23 defaultSymbols_FontId, 23 defaultSymbols_FontId,
24 defaultLargeSymbols_FontId, 24 defaultMediumSymbols_FontId,
25 symbols_FontId, 25 symbols_FontId,
26 mediumSymbols_FontId, 26 mediumSymbols_FontId,
27 largeSymbols_FontId, 27 largeSymbols_FontId,
@@ -29,7 +29,7 @@ enum iFontId {
29 smallSymbols_FontId, 29 smallSymbols_FontId,
30 /* emoji fonts */ 30 /* emoji fonts */
31 defaultEmoji_FontId, 31 defaultEmoji_FontId,
32 defaultLargeEmoji_FontId, 32 defaultMediumEmoji_FontId,
33 emoji_FontId, 33 emoji_FontId,
34 mediumEmoji_FontId, 34 mediumEmoji_FontId,
35 largeEmoji_FontId, 35 largeEmoji_FontId,
@@ -42,7 +42,7 @@ enum iFontId {
42 uiLabel_FontId = default_FontId, 42 uiLabel_FontId = default_FontId,
43 uiShortcuts_FontId = default_FontId, 43 uiShortcuts_FontId = default_FontId,
44 uiInput_FontId = defaultMonospace_FontId, 44 uiInput_FontId = defaultMonospace_FontId,
45 uiBookmarkIcon_FontId = defaultLarge_FontId, 45 uiContent_FontId = defaultMedium_FontId,
46 /* Document fonts: */ 46 /* Document fonts: */
47 paragraph_FontId = regular_FontId, 47 paragraph_FontId = regular_FontId,
48 firstParagraph_FontId = medium_FontId, 48 firstParagraph_FontId = medium_FontId,