mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-20 20:55:42 +00:00
Add shortcuts for using user's preferred fixed font in MiniQtHelper
This commit is contained in:
@@ -439,10 +439,16 @@ void MiniQtHelper::SetWidgetFont(QWidget *widget, const rdcstr &font, int32_t fo
|
||||
if(!widget)
|
||||
return;
|
||||
|
||||
QString fontFamily = font;
|
||||
if(font == "_default")
|
||||
fontFamily = Formatter::PreferredFont().family();
|
||||
if(font == "_fixed")
|
||||
fontFamily = Formatter::FixedFont().family();
|
||||
|
||||
QFont f = widget->font();
|
||||
|
||||
if(!font.empty())
|
||||
f.setFamily(font);
|
||||
if(!fontFamily.isEmpty())
|
||||
f.setFamily(fontFamily);
|
||||
if(fontSize != 0)
|
||||
f.setPointSize(fontSize);
|
||||
f.setBold(bold);
|
||||
|
||||
Reference in New Issue
Block a user