Changeset 10 in tspsg-svn


Ignore:
Timestamp:
Oct 19, 2007, 3:41:00 AM (17 years ago)
Author:
laleppa
Message:

Now label hint (and Settings Dialog) aren't resized when text changes from one-line to two-line and vice versa.
This is a hack! Any better solution?

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/settingsdialog.cpp

    r9 r10  
    3636        setWindowFlags(windowFlags() ^ Qt::WindowContextHelpButtonHint);
    3737        layout()->setSizeConstraint(layout()->SetFixedSize);
    38         // Setting initial text of dialog hint label to own status tip text
     38        // Setting initial text of dialog hint label to own status tip
     39        // text.
    3940        labelHint->setText(labelHint->statusTip());
     41        // HACK: Do not resize label hint (and dialog) when text changes
     42        // from one-line to two-line and vice versa. Any better solution?
     43        labelHint->setMaximumHeight(labelHint->height());
     44        labelHint->setMinimumHeight(labelHint->height());
    4045}
    4146
     
    4449        // Checking for StatusTip event and if tip text is not empty string
    4550        // setting it as text of the dialog hint label. Otherwise, setting
    46         // dialog hint label text to own status tip text
     51        // dialog hint label text to own status tip text.
    4752        if (ev->type() == QEvent::StatusTip) {
    4853QString tip = static_cast<QStatusTipEvent *>(ev)->tip();
  • trunk/ui/settingsdialog.ui

    r7 r10  
    66    <x>0</x>
    77    <y>0</y>
    8     <width>440</width>
    9     <height>176</height>
     8    <width>436</width>
     9    <height>172</height>
    1010   </rect>
    1111  </property>
     
    303303          </property>
    304304          <property name="statusTip" >
    305            <string>Открывать окно в том же положении и с теми же размерами, с какими оно было закрыто</string>
     305           <string>Восстанавливать состояние и размеры окна после перезапуска программы</string>
    306306          </property>
    307307          <property name="text" >
     
    381381        </sizepolicy>
    382382       </property>
    383        <property name="minimumSize" >
    384         <size>
    385          <width>235</width>
    386          <height>30</height>
    387         </size>
    388        </property>
    389383       <property name="statusTip" >
    390         <string>Наведите указателем мыши на требуемый элемент диалога, чтоб получить подсказку</string>
     384        <string>Наведите указатель мыши на элемент диалога, чтоб получить подсказку</string>
     385       </property>
     386       <property name="text" >
     387        <string/>
    391388       </property>
    392389       <property name="textFormat" >
     
    394391       </property>
    395392       <property name="alignment" >
    396         <set>Qt::AlignJustify|Qt::AlignVCenter</set>
     393        <set>Qt::AlignJustify|Qt::AlignTop</set>
    397394       </property>
    398395       <property name="wordWrap" >
Note: See TracChangeset for help on using the changeset viewer.