Changeset 11137:444c1ffd33dc in orange


Ignore:
Timestamp:
10/17/12 18:38:52 (18 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Don't set negative fixed sizes on the buttons in a toolbar.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeCanvas/gui/toolbar.py

    r11100 r11137  
    109109    if expanding == Qt.Horizontal: 
    110110        space = contents_rect.width() - spacing_space 
    111         setter = lambda w, s: w.setFixedWidth(s) 
     111        setter = lambda w, s: w.setFixedWidth(max(s, 0)) 
    112112    else: 
    113113        space = contents_rect.height() - spacing_space 
    114         setter = lambda w, s: w.setFixedHeight(s) 
     114        setter = lambda w, s: w.setFixedHeight(max(s, 0)) 
    115115 
    116116    base_size = space / len(items) 
Note: See TracChangeset for help on using the changeset viewer.