UIFigure appearance (scaling) change between 2023b and 2024a

21 vues (au cours des 30 derniers jours)
Joe Vinciguerra
Joe Vinciguerra le 10 Juin 2024
I wrote an app in 2023b, but after installing 2024a the figure doesn't appear the same, and some of my UI controls actually fall off the figure in 2024a. Below is a simplified example of the issue.
Here is the code I ran in both versions:
fig = uifigure(Name="This is in 2023b");
% fig = uifigure(Name="This is in 2024a");
lbl = uilabel(fig);
lbl.Text = "This is a label";
lbl.Position = [20 200 100 60];
Here is a screenshot of the outputs side-by-side:
As you can see the font and the spacing in 2024a is slightly larger, as if it is scaled differently. And it's not just with UILables, the size and spacing is larger for all objects in 2024a compared to 2023b.
I reset all default groot settings with reset(groot, "default")
I recursivly cleared all personal settings with [setting].clearPersonalValue
But I still get this result.
It's a fairly large and complex app with a lot of ui controls and I don't want to rewrite it because if this.
Is there a setting somewhere I'm overlooking, or something else I'm missing?
  3 commentaires
Joe Vinciguerra
Joe Vinciguerra le 11 Juin 2024
Modifié(e) : Joe Vinciguerra le 11 Juin 2024
After disabling all Add-Ons, and checking the startup.m and matlabrc.m files for anything that could cause this, the issue persists.
In the Editor window the scaling is different as well at the same zoom level (see below, 2023b on the left, 2024a on the right). This is also true of the Live Editor, but not the other windows (i.e. Command Window, Command History, Current Folder, and Workspace are scaled the same).
Joe Vinciguerra
Joe Vinciguerra le 11 Juin 2024
I uninstalled all versions of Matlab, deleted all residual files in ../../matlabroot and ../../prefdir, installed 2024a, then installed 2023b (in that order). The issue persists! Somehow, somewhere, it persists! How is this?

Connectez-vous pour commenter.

Réponse acceptée

Joe Vinciguerra
Joe Vinciguerra le 24 Juin 2024
After discussing with MathWorks Technical Support, they suggested checking the following settings:
settings().matlab.desktop.DisplayScaleFactor = 1
and
Windows Settings > Ease of Access > Display > Make text bigger = 100%
For my particular situation it was that the Windows text size was set to 113%. Changing this to 100% resolved the issue. Per MathWorks Technical Support, "Increasing the text size in Windows OS causes UIs within MATLAB R2024a to appear larger, owing to the underlying technology used for UI display in MATLAB R2024a". From my experience with this issue this is different from 2023.

Plus de réponses (0)

Catégories

En savoir plus sur Develop uifigure-Based Apps dans Help Center et File Exchange

Produits


Version

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by