add ui and viewport scale option, fix combobox items height from parent
This commit is contained in:
11
src/main.cpp
11
src/main.cpp
@@ -839,11 +839,16 @@ int main(int argc, char** argv)
|
||||
RegisterClass(&wc);
|
||||
|
||||
auto monitor = MonitorFromWindow(0, MONITOR_DEFAULTTOPRIMARY);
|
||||
auto x = unsigned{96};
|
||||
auto y = unsigned{96};
|
||||
auto x = unsigned{ 96 };
|
||||
auto y = unsigned{ 96 };
|
||||
if (GetDpiForMonitor_fn)
|
||||
GetDpiForMonitor_fn(monitor, MDT_EFFECTIVE_DPI, &x, &y);
|
||||
App::I->zoom *= (float)x / 96.f;
|
||||
App::I->display_density = (float)x / 96.f;
|
||||
|
||||
if (Settings::has("ui-scale"))
|
||||
App::I->zoom = Settings::value<Serializer::Float>("ui-scale");
|
||||
else
|
||||
App::I->zoom = (float)x / 96.f;
|
||||
|
||||
int show_cmd = SW_NORMAL;
|
||||
Settings::value<Serializer::Integer>("window-show-cmd", show_cmd);
|
||||
|
||||
Reference in New Issue
Block a user