diff options
Diffstat (limited to 'src/ui/sidebarwidget.c')
-rw-r--r-- | src/ui/sidebarwidget.c | 6 |
1 files changed, 3 insertions, 3 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 | ||
173 | enum iSidebarMode mode_SidebarWidget(const iSidebarWidget *d) { | 173 | enum 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++) { |