You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I set display scale in Windows above 100% my app does not scale corretly - window is bigger, but it's content (widgets, fonts, SplitLayouts) does not scale with window size.
g.SingleWindow().Layout(
g.SplitLayout(g.DirectionVertical, 580,
g.SplitLayout(g.DirectionHorizontal, 1200,
g.Layout{
g.Table().Flags(g.TableFlagsResizable).Rows(buildTableRows()...).Columns(buildTableColumns()...),
g.Custom(func() {
iflen(animeList) ==0 {
g.Label("\n\n\n\n\n\n\n Drag n' Drop your anime here").Font(g.AddFont("Arial", 35)).Build()
}
}),
},
g.Layout{
g.Label("Settings"),
g.Label(""),
g.Label("Target resolution"),
g.Combo("", resolutionsNames[settings.Resolution], resolutionsNames, &settings.Resolution).Size(400),
g.Label(""),
g.Label("Shaders mode"),
g.Tooltip("Check the project's GitHub page if you're not sure what to choose"),
g.Combo("", shaders[settings.Shaders].Name, shadersNames, &settings.Shaders).Size(400),
g.Tooltip("Check the project's GitHub page if you're not sure what to choose"),
g.Label(""),
g.Label("Encoder"),
g.Tooltip("Codec for encoding output file. In most cases GPU based are faster, use CPU mainly if you have slow GPU\n"+"AV1 is compatible only with RTX 4000+ and RX 6500XT+"),
g.Combo("", availableEncoders[settings.Encoder].Name, availableEncodersNames, &settings.Encoder).Size(400),
g.Tooltip("Codec for encoding output file. In most cases GPU based are faster, use CPU mainly if you have slow GPU\n"+"GPU based AV1 is compatible only with RTX 4000+ and RX 6500XT+"),
g.Label(""),
g.Label("Output format"),
g.Combo("", outputFormats[settings.OutputFormat], outputFormats, &settings.OutputFormat).Size(400),
g.Label(""),
g.Checkbox("Compatibility mode", &settings.CompatibilityMode),
g.Tooltip("Should be used only for compatibility troubleshooting, disables most of features"),
g.Checkbox("Debug mode", &settings.DebugMode),
g.Tooltip("Show more detailed logs, useful for troubleshooting and debugging"),
g.Label(""),
g.Button(buttonLabel).OnClick(handleButton).Size(360, 30),
},
),
g.Layout{
g.Label("Logs"),
g.InputTextMultiline(&logs).Flags(g.InputTextFlagsReadOnly).Size(1600, 270),
g.SplitLayout(g.DirectionHorizontal, 1310,
g.SplitLayout(g.DirectionHorizontal, 120,
g.Label("Progress: "+totalProgress),
g.ProgressBar(progress).Overlay(progressLabel).Size(1170, 20),
),
g.SplitLayout(g.DirectionHorizontal, 110,
g.Label(currentSpeed),
g.Label(eta),
),
),
},
),
)
What happend?
When I set display scale in Windows above 100% my app does not scale corretly - window is bigger, but it's content (widgets, fonts, SplitLayouts) does not scale with window size.
Code example
Ful code of GUI: https://github.com/mikigal/Anime4K-GUI/blob/master/gui.go
main.go
To Reproduce
Version
master
OS
Windows 11 23H2
The text was updated successfully, but these errors were encountered: