Skip to content

Commit 01bfeb7

Browse files
committed
Merge hotfix: VerticalAlignment 'middle' → 'center' (uilabel runtime fix)
2 parents cb6cee2 + 8a904e4 commit 01bfeb7

3 files changed

Lines changed: 13 additions & 13 deletions

File tree

libs/FastSenseCompanion/DashboardListPane.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ function attach(obj, parentPanel, hFig, engines, theme)
117117
obj.hCountLabel_.FontSize = 11;
118118
obj.hCountLabel_.FontColor = obj.Theme_.PlaceholderTextColor;
119119
obj.hCountLabel_.HorizontalAlignment = 'left';
120-
obj.hCountLabel_.VerticalAlignment = 'middle';
120+
obj.hCountLabel_.VerticalAlignment = 'center';
121121
obj.hCountLabel_.BackgroundColor = obj.Theme_.WidgetBackground;
122122

123123
% Populate initial row list
@@ -304,7 +304,7 @@ function renderEmptyState_(obj, msgText)
304304
lbl.FontSize = 11;
305305
lbl.FontColor = obj.Theme_.PlaceholderTextColor;
306306
lbl.HorizontalAlignment = 'center';
307-
lbl.VerticalAlignment = 'middle';
307+
lbl.VerticalAlignment = 'center';
308308
lbl.Units = 'normalized';
309309
lbl.Position = [0 0 1 1];
310310
end

libs/FastSenseCompanion/InspectorPane.m

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -135,21 +135,21 @@ function renderWelcome_(obj)
135135
l1 = uilabel(g); l1.Layout.Row = 1; l1.Layout.Column = 1;
136136
l1.Text = obj.hFig_.Name; l1.FontSize = 14; l1.FontWeight = 'bold';
137137
l1.FontColor = t.ForegroundColor; l1.HorizontalAlignment = 'left';
138-
l1.VerticalAlignment = 'middle';
138+
l1.VerticalAlignment = 'center';
139139
nT = 0; nD = 0;
140140
if isfield(obj.Payload_, 'nTags'); nT = obj.Payload_.nTags; end
141141
if isfield(obj.Payload_, 'nDashboards'); nD = obj.Payload_.nDashboards; end
142142
l3 = uilabel(g); l3.Layout.Row = 3; l3.Layout.Column = 1;
143143
l3.Text = sprintf('%d tags %s %d dashboards', nT, char(183), nD);
144144
l3.FontSize = 11; l3.FontColor = t.PlaceholderTextColor;
145-
l3.HorizontalAlignment = 'left'; l3.VerticalAlignment = 'middle';
145+
l3.HorizontalAlignment = 'left'; l3.VerticalAlignment = 'center';
146146
hints = {'Select a tag for details', 'Click a dashboard row for summary', ...
147147
'Select 2+ tags to compose a plot'};
148148
for i = 1:3
149149
lh = uilabel(g); lh.Layout.Row = 4 + i; lh.Layout.Column = 1;
150150
lh.Text = hints{i}; lh.FontSize = 11;
151151
lh.FontColor = t.PlaceholderTextColor;
152-
lh.HorizontalAlignment = 'left'; lh.VerticalAlignment = 'middle';
152+
lh.HorizontalAlignment = 'left'; lh.VerticalAlignment = 'center';
153153
end
154154
end
155155

@@ -185,7 +185,7 @@ function renderTag_(obj)
185185
if isempty(rules)
186186
lb = uilabel(hTh); lb.Text = 'No thresholds defined'; lb.FontSize = 11;
187187
lb.FontColor = t.PlaceholderTextColor; lb.HorizontalAlignment = 'left';
188-
lb.VerticalAlignment = 'middle'; lb.Units = 'normalized'; lb.Position = [0 0 1 1];
188+
lb.VerticalAlignment = 'center'; lb.Units = 'normalized'; lb.Position = [0 0 1 1];
189189
else
190190
rg = uigridlayout(hTh, [numel(rules) 1]);
191191
rg.RowHeight = repmat({20}, 1, numel(rules)); rg.ColumnWidth = {'1x'};
@@ -243,7 +243,7 @@ function renderNoData_(obj, msgText)
243243
t = obj.Theme_;
244244
lb = uilabel(obj.hSparkPanel_); lb.Text = msgText; lb.FontSize = 11;
245245
lb.FontColor = t.PlaceholderTextColor; lb.HorizontalAlignment = 'center';
246-
lb.VerticalAlignment = 'middle'; lb.Units = 'normalized'; lb.Position = [0 0 1 1];
246+
lb.VerticalAlignment = 'center'; lb.Units = 'normalized'; lb.Position = [0 0 1 1];
247247
end
248248

249249
function onOpenDetail_(obj, tag)
@@ -269,7 +269,7 @@ function renderDashboard_(obj)
269269
lt = uilabel(g); lt.Layout.Row = 1; lt.Layout.Column = 1;
270270
lt.Text = db.Name; lt.FontSize = 14; lt.FontWeight = 'bold';
271271
lt.FontColor = t.ForegroundColor; lt.WordWrap = 'on';
272-
lt.HorizontalAlignment = 'left'; lt.VerticalAlignment = 'middle';
272+
lt.HorizontalAlignment = 'left'; lt.VerticalAlignment = 'center';
273273
wc = numel(db.Widgets);
274274
for pp = 1:numel(db.Pages); wc = wc + numel(db.Pages{pp}.Widgets); end
275275
obj.buildMetaRow_(g, 3, 'Widgets', sprintf('%d', wc));
@@ -284,7 +284,7 @@ function renderDashboard_(obj)
284284
if isempty(bindings)
285285
lb = uilabel(hTg); lb.Text = 'No tag bindings'; lb.FontSize = 11;
286286
lb.FontColor = t.PlaceholderTextColor; lb.HorizontalAlignment = 'center';
287-
lb.VerticalAlignment = 'middle'; lb.Units = 'normalized'; lb.Position = [0 0 1 1];
287+
lb.VerticalAlignment = 'center'; lb.Units = 'normalized'; lb.Position = [0 0 1 1];
288288
else
289289
tg = uigridlayout(hTg, [numel(bindings) 1]);
290290
tg.RowHeight = repmat({20}, 1, numel(bindings)); tg.ColumnWidth = {'1x'};
@@ -387,7 +387,7 @@ function renderMultitag_(obj)
387387
cr.Padding = [4 0 4 0]; cr.ColumnSpacing = 4; cr.BackgroundColor = t.WidgetBackground;
388388
ln = uilabel(cr); ln.Layout.Row = 1; ln.Layout.Column = 1;
389389
ln.Text = tg.Name; ln.FontSize = 11; ln.FontColor = t.ForegroundColor;
390-
ln.HorizontalAlignment = 'left'; ln.VerticalAlignment = 'middle';
390+
ln.HorizontalAlignment = 'left'; ln.VerticalAlignment = 'center';
391391
ln.Tooltip = tg.Key;
392392
bx = uibutton(cr, 'push'); bx.Layout.Row = 1; bx.Layout.Column = 2;
393393
bx.Text = char(215); bx.FontSize = 11; bx.FontColor = t.ToolbarFontColor;
@@ -480,10 +480,10 @@ function buildMetaRow_(obj, parentGrid, rowIdx, keyTxt, valTxt)
480480
lk = uilabel(hr); lk.Layout.Row = 1; lk.Layout.Column = 1;
481481
lk.Text = keyTxt; lk.FontSize = 11; lk.FontWeight = 'bold';
482482
lk.FontColor = t.PlaceholderTextColor; lk.HorizontalAlignment = 'left';
483-
lk.VerticalAlignment = 'middle';
483+
lk.VerticalAlignment = 'center';
484484
lv = uilabel(hr); lv.Layout.Row = 1; lv.Layout.Column = 2;
485485
lv.Text = valTxt; lv.FontSize = 11; lv.FontColor = t.ForegroundColor;
486-
lv.HorizontalAlignment = 'left'; lv.VerticalAlignment = 'middle';
486+
lv.HorizontalAlignment = 'left'; lv.VerticalAlignment = 'center';
487487
end
488488

489489
end

libs/FastSenseCompanion/TagCatalogPane.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ function attach(obj, parentPanel, hFig, registry, theme)
171171
obj.hCountLabel_.FontSize = 11;
172172
obj.hCountLabel_.FontColor = obj.Theme_.PlaceholderTextColor;
173173
obj.hCountLabel_.HorizontalAlignment = 'left';
174-
obj.hCountLabel_.VerticalAlignment = 'middle';
174+
obj.hCountLabel_.VerticalAlignment = 'center';
175175
obj.hCountLabel_.BackgroundColor = obj.Theme_.WidgetBackground;
176176

177177
% Build initial listbox content

0 commit comments

Comments
 (0)