Skip to content

Commit

Permalink
Don't display model icons in cloud toolbar due to bad vertical alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
rhennigan committed Dec 14, 2023
1 parent 781db5b commit 05d56aa
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Source/Chatbook/PreferencesContent.wl
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,9 @@ makeModelNameSelector[
],
modelSelectCallback[ Dynamic @ service, Dynamic @ model ]
],
Map[ popupValue[ #[ "Name" ], #[ "DisplayName" ], #[ "Icon" ] ] &, models ],
Block[ { $noIcons = TrueQ @ $cloudNotebooks },
Map[ popupValue[ #[ "Name" ], #[ "DisplayName" ], #[ "Icon" ] ] &, models ]
],
ImageSize -> Automatic
]
]
Expand Down Expand Up @@ -1348,7 +1350,10 @@ popupValue[ value_String, label: Except[ $$unspecified ] ] :=
value -> label;

popupValue[ value_String, label: Except[ $$unspecified ], icon: Except[ $$unspecified ] ] :=
value -> Row[ { resizeMenuIcon @ inlineTemplateBoxes @ icon, label }, Spacer[ 1 ] ];
If[ TrueQ @ $noIcons,
value -> label,
value -> Row[ { resizeMenuIcon @ inlineTemplateBoxes @ icon, label }, Spacer[ 1 ] ]
];

popupValue // endDefinition;

Expand Down

0 comments on commit 05d56aa

Please sign in to comment.