diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-09-03 19:16:05 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-09-03 19:16:05 +0300 |
commit | 6d03cbb784b39ca457bcfce5f12de31972102790 (patch) | |
tree | 087f72f33f6259a932a75f610d4b3fc5e15844a9 /src/ui/documentwidget.c | |
parent | 814c513984965d2732ef36215ba3fad97875af51 (diff) |
GmDocument: Light theme cleanup
Diffstat (limited to 'src/ui/documentwidget.c')
-rw-r--r-- | src/ui/documentwidget.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index c7056383..437e9468 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c | |||
@@ -1367,7 +1367,8 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e | |||
1367 | ev->key.repeat != 0); | 1367 | ev->key.repeat != 0); |
1368 | return iTrue; | 1368 | return iTrue; |
1369 | #if 1 | 1369 | #if 1 |
1370 | case SDLK_KP_1: { | 1370 | case SDLK_KP_1: |
1371 | case '`': { | ||
1371 | iBlock *seed = new_Block(64); | 1372 | iBlock *seed = new_Block(64); |
1372 | for (size_t i = 0; i < 64; ++i) { | 1373 | for (size_t i = 0; i < 64; ++i) { |
1373 | setByte_Block(seed, i, iRandom(0, 255)); | 1374 | setByte_Block(seed, i, iRandom(0, 255)); |
@@ -1636,12 +1637,20 @@ static void drawRun_DrawContext_(void *context, const iGmRun *run) { | |||
1636 | init_String(&bannerText); | 1637 | init_String(&bannerText); |
1637 | iInt2 bpos = add_I2(visPos, init_I2(0, lineHeight_Text(banner_FontId) / 2)); | 1638 | iInt2 bpos = add_I2(visPos, init_I2(0, lineHeight_Text(banner_FontId) / 2)); |
1638 | if (icon) { | 1639 | if (icon) { |
1640 | // appendChar_String(&bannerText, 0x2b24); // icon); | ||
1641 | // const iRect iconRect = visualBounds_Text(hugeBold_FontId, range_String(&bannerText)); | ||
1642 | // drawRange_Text(hugeBold_FontId, /*run->font,*/ | ||
1643 | // addY_I2(bpos, -mid_Rect(iconRect).y + lineHeight_Text(run->font) / 2), | ||
1644 | // tmBannerIcon_ColorId, | ||
1645 | // range_String(&bannerText)); | ||
1646 | // clear_String(&bannerText); | ||
1639 | appendChar_String(&bannerText, icon); | 1647 | appendChar_String(&bannerText, icon); |
1640 | const iRect iconRect = visualBounds_Text(banner_FontId, range_String(&bannerText)); | 1648 | const iRect iconRect = visualBounds_Text(run->font, range_String(&bannerText)); |
1641 | drawRange_Text(run->font, | 1649 | drawRange_Text( |
1642 | addY_I2(bpos, -mid_Rect(iconRect).y + lineHeight_Text(run->font) / 2), | 1650 | run->font, |
1643 | tmBannerIcon_ColorId, | 1651 | addY_I2(bpos, -mid_Rect(iconRect).y + lineHeight_Text(run->font) / 2), |
1644 | range_String(&bannerText)); | 1652 | tmBannerIcon_ColorId, |
1653 | range_String(&bannerText)); | ||
1645 | bpos.x += right_Rect(iconRect) + 3 * gap_Text; | 1654 | bpos.x += right_Rect(iconRect) + 3 * gap_Text; |
1646 | } | 1655 | } |
1647 | drawRange_Text(run->font, | 1656 | drawRange_Text(run->font, |