QTfrontend/ui/widget/igbox.cpp
changeset 6616 f77bb02b669f
parent 6060 fdfc01419815
child 6700 e04da46ee43c
equal deleted inserted replaced
6615:65602f1ef0f8 6616:f77bb02b669f
    34 
    34 
    35 void IconedGroupBox::setIcon(const QIcon & icon)
    35 void IconedGroupBox::setIcon(const QIcon & icon)
    36 {
    36 {
    37     if (this->icon.isNull())
    37     if (this->icon.isNull())
    38         setStyleSheet(QString(
    38         setStyleSheet(QString(
    39             "IconedGroupBox{"
    39                           "IconedGroupBox{"
    40                 "margin-top: 46px;"
    40                           "margin-top: 46px;"
    41                 "margin-left: 12px;"
    41                           "margin-left: 12px;"
    42                 "padding: %1px 2px 5px 2px;"
    42                           "padding: %1px 2px 5px 2px;"
    43                 "}"
    43                           "}"
    44             "IconedGroupBox::title{"
    44                           "IconedGroupBox::title{"
    45                 "subcontrol-origin: margin;"
    45                           "subcontrol-origin: margin;"
    46                 "subcontrol-position: top left;"
    46                           "subcontrol-position: top left;"
    47                 "padding-left: %2px;"
    47                           "padding-left: %2px;"
    48                 "padding-top: %1px;"
    48                           "padding-top: %1px;"
    49                 "text-align: left;"
    49                           "text-align: left;"
    50                 "}"
    50                           "}"
    51                 ).arg(contentTopPadding).arg(titleLeftPadding)
    51                       ).arg(contentTopPadding).arg(titleLeftPadding)
    52         );
    52                      );
    53 
    53 
    54     this->icon = icon;
    54     this->icon = icon;
    55     repaint();
    55     repaint();
    56 }
    56 }
    57 
    57