Skip to content

Commit 6166bf4

Browse files
committed
change brain atlas button to use a tooltip instead of resize
1 parent 7586a7d commit 6166bf4

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

+nla/+inputField/NetworkAtlas.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,9 @@ function update(obj)
198198
obj.checkbox_surface_parcels.Value = false;
199199
end
200200
end
201-
obj.button.Position(3) = widthOfString(obj.button.Text, LABEL_H) + widthOfString(' ', LABEL_H + LABEL_GAP);
201+
% Instead of changing the width of the button and making the line unusable, use a tooltip
202+
% obj.button.Position(3) = widthOfString(obj.button.Text, LABEL_H) + widthOfString(' ', LABEL_H + LABEL_GAP);
203+
obj.button.Tooltip = obj.button.Text;
202204

203205
obj.inflation_label.Position(1) = obj.button.Position(1) + obj.button.Position(3) + LABEL_GAP;
204206
obj.inflation_dropdown.Position(1) = obj.button.Position(1) + obj.button.Position(3) + LABEL_GAP +...

+nla/+inputField/NetworkAtlasFuncConn.m

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ function buttonClickedCallback(obj, ~)
193193
obj.checkbox_surface_parcels.Value = true;
194194
end
195195

196-
obj.update();
196+
obj.update(true);
197197
close(prog);
198198
catch ex
199199
close(prog);
@@ -246,7 +246,7 @@ function button2ClickedCallback(obj, ~)
246246
end
247247
end
248248

249-
obj.update();
249+
obj.update(false);
250250
close(prog);
251251
else
252252
close(prog);
@@ -312,7 +312,7 @@ function updateFuncConn(obj)
312312
end
313313
end
314314

315-
function update(obj)
315+
function update(obj, network_atlas_button)
316316
import nla.inputField.widthOfString nla.inputField.LABEL_H nla.inputField.LABEL_GAP
317317

318318
obj.updateFuncConn();
@@ -332,8 +332,9 @@ function update(obj)
332332
obj.checkbox_surface_parcels.Value = false;
333333
end
334334
end
335-
obj.button.Position(3) = widthOfString(obj.button.Text, LABEL_H) + widthOfString(' ', LABEL_H + LABEL_GAP);
336-
335+
% Instead of changing the width of the button and making the line unusable, use a tooltip
336+
% obj.button.Position(3) = widthOfString(obj.button.Text, LABEL_H) + widthOfString(' ', LABEL_H + LABEL_GAP);
337+
obj.button.Tooltip = obj.button.Text;
337338

338339
obj.inflation_label.Position(1) = obj.button.Position(1) + obj.button.Position(3) + LABEL_GAP;
339340
obj.inflation_dropdown.Position(1) = obj.button.Position(1) + obj.button.Position(3) + LABEL_GAP +...

0 commit comments

Comments
 (0)