Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyifang committed Dec 28, 2024
1 parent 78bef02 commit 9032bc8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/ui/groupcombobox.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ void GroupComboBox::fill( Instances::Groups const & groups )

shortcuts.clear();

QFontMetrics metrics( font() );
int size = metrics.height();
setIconSize( QSize( size, size ) );
int size = height();
if ( size > 0 ) {
setIconSize( QSize( size, size ) );
}
for ( unsigned x = 0; x < groups.size(); ++x ) {
addItem( groups[ x ].makeIcon(), groups[ x ].name, groups[ x ].id );

Expand Down

0 comments on commit 9032bc8

Please sign in to comment.