Skip to content

Commit 31058d1

Browse files
committed
Fix bold offset
1 parent d27f6d8 commit 31058d1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ int main(int argc, char** argv)
158158

159159
const auto& active_theme = GuiTheme::getCurrentTheme();
160160
main_font = active_theme->getStyle("base")->get(GuiElement::State::Normal).font;
161-
bold_font = active_theme->getStyle("bold")->states[0].font;
161+
bold_font = active_theme->getStyle("bold")->states[GuiElement::State::Normal].font;
162162
if (!main_font || !bold_font)
163163
{
164164
LOG(ERROR, "Missing font or bold font.");
@@ -171,7 +171,7 @@ int main(int argc, char** argv)
171171
// Apply baseline offset adjustments to fonts
172172
// Positive values move text down, negative values move text up
173173
main_font->setBaselineOffset(active_theme->getStyle("base")->get(GuiElement::State::Normal).offset);
174-
bold_font->setBaselineOffset(active_theme->getStyle("base")->get(GuiElement::State::Normal).offset);
174+
bold_font->setBaselineOffset(active_theme->getStyle("bold")->get(GuiElement::State::Normal).offset);
175175

176176
// On Android, this requires the 'record audio' permissions,
177177
// which is always a scary thing for users.

0 commit comments

Comments
 (0)