mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-10 03:18:55 +02:00
[desktop] Use pixel-based font sizes instead of point-based for game card (#3827)
Archaic systems that still don't utilize point sizes properly should like this. Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3827
This commit is contained in:
parent
9c13c71da8
commit
50a6f331cf
1 changed files with 1 additions and 5 deletions
|
|
@ -92,9 +92,6 @@ void GameCard::paint(QPainter* painter, const QStyleOptionViewItem& option,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (UISettings::values.show_game_name.GetValue()) {
|
if (UISettings::values.show_game_name.GetValue()) {
|
||||||
// if "none" is selected, pretend there's a
|
|
||||||
_iconsize = _iconsize ? _iconsize : 96;
|
|
||||||
|
|
||||||
// padding + text
|
// padding + text
|
||||||
QRect textRect = cardRect;
|
QRect textRect = cardRect;
|
||||||
textRect.setTop(iconRect.bottom() + margins);
|
textRect.setTop(iconRect.bottom() + margins);
|
||||||
|
|
@ -110,8 +107,7 @@ void GameCard::paint(QPainter* painter, const QStyleOptionViewItem& option,
|
||||||
font.setBold(true);
|
font.setBold(true);
|
||||||
|
|
||||||
// TODO(crueter): fix this abysmal scaling
|
// TODO(crueter): fix this abysmal scaling
|
||||||
// If "none" is selected, then default to 8.5 point font.
|
font.setPixelSize(1.5 + std::max(10.0, std::sqrt(_iconsize)));
|
||||||
font.setPointSize(1 + std::max(7.0, _iconsize ? std::sqrt(_iconsize * 0.6) : 7.5));
|
|
||||||
|
|
||||||
// TODO(crueter): elide mode
|
// TODO(crueter): elide mode
|
||||||
painter->setFont(font);
|
painter->setFont(font);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue