Skip to content

Commit 52f4bd4

Browse files
committed
Remove DefaultSize property in ButtonGrid
The default size resets the ButtonWidth and ButtonHeight during update.
1 parent 0377ea5 commit 52f4bd4

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

widgets/+wt/ButtonGrid.m

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@
4242
% Alignment of the icon
4343
IconAlignment (1,1) wt.enum.AlignmentState = wt.enum.AlignmentState.top
4444

45-
% Default size of new buttons ('1x' or 'fit')
46-
DefaultSize {mustBeMember(DefaultSize,{'1x','fit'})} = '1x'
47-
4845
end %properties
4946

5047

@@ -159,15 +156,6 @@ function update(obj)
159156

160157
end %for idx = 1:numNew
161158

162-
% Update layout
163-
if obj.Orientation == "vertical"
164-
obj.Grid.ColumnWidth = {obj.DefaultSize};
165-
obj.Grid.RowHeight = repmat({obj.DefaultSize},1,numNew);
166-
else
167-
obj.Grid.ColumnWidth = repmat({obj.DefaultSize},1,numNew);
168-
obj.Grid.RowHeight = {obj.DefaultSize};
169-
end %if obj.Orientation == "vertical"
170-
171159
end %function
172160

173161

0 commit comments

Comments
 (0)