commit 6b5b962442e64bfe5edc9b139778c3ba8e14c637 Author: Tomas Touceda chiiph@torproject.org Date: Sat Jun 11 13:05:24 2011 -0300
Fix layout to adapt to any label length
Fixes bug 2500. --- src/vidalia/bwgraph/BandwidthGraph.ui | 658 ++++++++++++++------------------- 1 files changed, 276 insertions(+), 382 deletions(-)
diff --git a/src/vidalia/bwgraph/BandwidthGraph.ui b/src/vidalia/bwgraph/BandwidthGraph.ui index 173168c..fb7fc94 100644 --- a/src/vidalia/bwgraph/BandwidthGraph.ui +++ b/src/vidalia/bwgraph/BandwidthGraph.ui @@ -1,55 +1,45 @@ -<ui version="4.0" > +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> <class>BandwidthGraph</class> - <widget class="QMainWindow" name="BandwidthGraph" > - <property name="geometry" > + <widget class="QMainWindow" name="BandwidthGraph"> + <property name="geometry"> <rect> <x>0</x> <y>0</y> - <width>283</width> - <height>138</height> + <width>553</width> + <height>381</height> </rect> </property> - <property name="contextMenuPolicy" > + <property name="contextMenuPolicy"> <enum>Qt::NoContextMenu</enum> </property> - <property name="windowTitle" > + <property name="windowTitle"> <string>Tor Bandwidth Usage</string> </property> - <property name="windowIcon" > - <iconset resource="../res/vidalia_common.qrc" >:/images/32x32/utilities-system-monitor.png</iconset> + <property name="windowIcon"> + <iconset> + <normaloff>:/images/32x32/utilities-system-monitor.png</normaloff>:/images/32x32/utilities-system-monitor.png</iconset> </property> - <widget class="QWidget" name="centralwidget" > - <layout class="QGridLayout" > - <property name="margin" > - <number>9</number> - </property> - <property name="spacing" > - <number>6</number> - </property> - <item row="1" column="0" > - <layout class="QHBoxLayout" > - <property name="margin" > - <number>0</number> - </property> - <property name="spacing" > - <number>6</number> - </property> + <widget class="QWidget" name="centralwidget"> + <layout class="QGridLayout"> + <item row="1" column="0"> + <layout class="QHBoxLayout"> <item> - <widget class="QPushButton" name="btnToggleSettings" > - <property name="text" > + <widget class="QPushButton" name="btnToggleSettings"> + <property name="text"> <string>Show Settings</string> </property> - <property name="checkable" > + <property name="checkable"> <bool>true</bool> </property> </widget> </item> <item> <spacer> - <property name="orientation" > + <property name="orientation"> <enum>Qt::Horizontal</enum> </property> - <property name="sizeHint" > + <property name="sizeHint" stdset="0"> <size> <width>21</width> <height>20</height> @@ -58,428 +48,332 @@ </spacer> </item> <item> - <widget class="QPushButton" name="btnReset" > - <property name="text" > + <widget class="QPushButton" name="btnReset"> + <property name="text"> <string>Reset</string> </property> </widget> </item> </layout> </item> - <item row="0" column="0" > - <widget class="GraphFrame" name="frmGraph" > - <property name="minimumSize" > + <item row="0" column="0"> + <widget class="GraphFrame" name="frmGraph"> + <property name="minimumSize"> <size> <width>120</width> <height>80</height> </size> </property> - <property name="font" > + <property name="font"> <font> <pointsize>10</pointsize> </font> </property> - <property name="contextMenuPolicy" > + <property name="contextMenuPolicy"> <enum>Qt::NoContextMenu</enum> </property> - <property name="frameShape" > + <property name="frameShape"> <enum>QFrame::Box</enum> </property> - <property name="frameShadow" > + <property name="frameShadow"> <enum>QFrame::Plain</enum> </property> </widget> </item> - <item row="2" column="0" > - <widget class="QFrame" name="frmSettings" > - <property name="sizePolicy" > - <sizepolicy> - <hsizetype>0</hsizetype> - <vsizetype>0</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize" > - <size> - <width>355</width> - <height>85</height> - </size> + <item row="0" column="1"> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> </property> - <property name="maximumSize" > + <property name="sizeHint" stdset="0"> <size> - <width>355</width> - <height>82</height> + <width>0</width> + <height>100</height> </size> </property> - <property name="contextMenuPolicy" > - <enum>Qt::NoContextMenu</enum> - </property> - <property name="frameShape" > + </spacer> + </item> + <item row="2" column="0"> + <widget class="QFrame" name="frmSettings"> + <property name="frameShape"> <enum>QFrame::StyledPanel</enum> </property> - <property name="frameShadow" > + <property name="frameShadow"> <enum>QFrame::Raised</enum> </property> - <layout class="QHBoxLayout" > - <property name="margin" > - <number>9</number> + <layout class="QGridLayout" name="gridLayout_2"> + <property name="sizeConstraint"> + <enum>QLayout::SetDefaultConstraint</enum> + </property> + <property name="horizontalSpacing"> + <number>10</number> + </property> + <property name="verticalSpacing"> + <number>0</number> </property> - <property name="spacing" > - <number>6</number> + <property name="margin"> + <number>5</number> </property> - <item> - <layout class="QVBoxLayout" > - <property name="margin" > - <number>3</number> + <item row="0" column="0"> + <widget class="QCheckBox" name="chkReceiveRate"> + <property name="contextMenuPolicy"> + <enum>Qt::NoContextMenu</enum> </property> - <property name="spacing" > - <number>6</number> + <property name="toolTip"> + <string/> </property> - <item> - <widget class="QCheckBox" name="chkReceiveRate" > - <property name="contextMenuPolicy" > - <enum>Qt::NoContextMenu</enum> - </property> - <property name="toolTip" > - <string/> - </property> - <property name="layoutDirection" > - <enum>Qt::RightToLeft</enum> - </property> - <property name="text" > - <string>Receive Rate</string> - </property> - <property name="checked" > - <bool>false</bool> - </property> - </widget> - </item> - <item> - <widget class="QCheckBox" name="chkSendRate" > - <property name="contextMenuPolicy" > - <enum>Qt::NoContextMenu</enum> - </property> - <property name="toolTip" > - <string/> - </property> - <property name="layoutDirection" > - <enum>Qt::RightToLeft</enum> - </property> - <property name="text" > - <string>Send Rate</string> - </property> - <property name="checked" > - <bool>false</bool> - </property> - </widget> - </item> - <item> - <widget class="QCheckBox" name="chkAlwaysOnTop" > - <property name="layoutDirection" > - <enum>Qt::RightToLeft</enum> - </property> - <property name="text" > - <string>Always on Top</string> - </property> - </widget> - </item> - <item> - <spacer> - <property name="orientation" > - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" > - <size> - <width>20</width> - <height>21</height> - </size> - </property> - </spacer> - </item> - </layout> + <property name="layoutDirection"> + <enum>Qt::RightToLeft</enum> + </property> + <property name="text"> + <string>Receive Rate</string> + </property> + <property name="checked"> + <bool>false</bool> + </property> + </widget> </item> - <item> - <layout class="QVBoxLayout" > - <property name="margin" > - <number>0</number> + <item row="2" column="0"> + <widget class="QCheckBox" name="chkSendRate"> + <property name="contextMenuPolicy"> + <enum>Qt::NoContextMenu</enum> </property> - <property name="spacing" > - <number>1</number> + <property name="toolTip"> + <string/> </property> + <property name="layoutDirection"> + <enum>Qt::RightToLeft</enum> + </property> + <property name="text"> + <string>Send Rate</string> + </property> + <property name="checked"> + <bool>false</bool> + </property> + </widget> + </item> + <item row="3" column="0"> + <widget class="QCheckBox" name="chkAlwaysOnTop"> + <property name="layoutDirection"> + <enum>Qt::RightToLeft</enum> + </property> + <property name="text"> + <string>Always on Top</string> + </property> + </widget> + </item> + <item row="0" column="1" colspan="3"> + <widget class="QLabel" name="lblGraphStyle"> + <property name="text"> + <string>Style</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item row="0" column="4"> + <widget class="QComboBox" name="cmbGraphStyle"> <item> - <layout class="QHBoxLayout" > - <property name="margin" > - <number>0</number> - </property> - <property name="spacing" > - <number>6</number> - </property> - <item> - <spacer> - <property name="orientation" > - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" > - <size> - <width>20</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QLabel" name="lblGraphStyle" > - <property name="text" > - <string>Style</string> - </property> - </widget> - </item> - <item> - <widget class="QComboBox" name="cmbGraphStyle" > - <item> - <property name="text" > - <string/> - </property> - <property name="icon" > - <iconset resource="../res/vidalia_common.qrc" >:/images/16x16/graph-line.png</iconset> - </property> - </item> - <item> - <property name="text" > - <string/> - </property> - <property name="icon" > - <iconset resource="../res/vidalia_common.qrc" >:/images/16x16/graph-area.png</iconset> - </property> - </item> - </widget> - </item> - </layout> - </item> - <item> - <widget class="QFrame" name="frmOpacity" > - <property name="contextMenuPolicy" > - <enum>Qt::NoContextMenu</enum> - </property> - <property name="frameShape" > - <enum>QFrame::NoFrame</enum> - </property> - <property name="frameShadow" > - <enum>QFrame::Plain</enum> - </property> - <layout class="QVBoxLayout" > - <property name="margin" > - <number>0</number> - </property> - <property name="spacing" > - <number>3</number> - </property> - <item> - <widget class="QSlider" name="sldrOpacity" > - <property name="contextMenuPolicy" > - <enum>Qt::NoContextMenu</enum> - </property> - <property name="toolTip" > - <string>Changes the transparency of the Bandwidth Graph</string> - </property> - <property name="minimum" > - <number>30</number> - </property> - <property name="maximum" > - <number>100</number> - </property> - <property name="value" > - <number>100</number> - </property> - <property name="sliderPosition" > - <number>100</number> - </property> - <property name="tracking" > - <bool>false</bool> - </property> - <property name="orientation" > - <enum>Qt::Horizontal</enum> - </property> - <property name="invertedAppearance" > - <bool>false</bool> - </property> - <property name="tickPosition" > - <enum>QSlider::NoTicks</enum> - </property> - <property name="tickInterval" > - <number>10</number> - </property> - </widget> - </item> - <item> - <spacer> - <property name="orientation" > - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" > - <size> - <width>20</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <layout class="QHBoxLayout" > - <property name="margin" > - <number>0</number> - </property> - <property name="spacing" > - <number>0</number> - </property> - <item> - <spacer> - <property name="orientation" > - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" > - <size> - <width>21</width> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QLabel" name="lblPercentOpacity" > - <property name="minimumSize" > - <size> - <width>25</width> - <height>0</height> - </size> - </property> - <property name="font" > - <font> - <pointsize>10</pointsize> - </font> - </property> - <property name="contextMenuPolicy" > - <enum>Qt::NoContextMenu</enum> - </property> - <property name="layoutDirection" > - <enum>Qt::RightToLeft</enum> - </property> - <property name="text" > - <string>100</string> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="label" > - <property name="font" > - <font> - <pointsize>10</pointsize> - </font> - </property> - <property name="contextMenuPolicy" > - <enum>Qt::NoContextMenu</enum> - </property> - <property name="text" > - <string>% Opaque</string> - </property> - </widget> - </item> - <item> - <spacer> - <property name="orientation" > - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" > - <size> - <width>21</width> - </size> - </property> - </spacer> - </item> - </layout> - </item> - </layout> - </widget> + <property name="text"> + <string/> + </property> + <property name="icon"> + <iconset> + <normaloff>:/images/16x16/graph-line.png</normaloff>:/images/16x16/graph-line.png</iconset> + </property> </item> <item> - <spacer> - <property name="orientation" > - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" > - <size> - <width>21</width> - <height>20</height> - </size> - </property> - </spacer> + <property name="text"> + <string/> + </property> + <property name="icon"> + <iconset> + <normaloff>:/images/16x16/graph-area.png</normaloff>:/images/16x16/graph-area.png</iconset> + </property> </item> - </layout> + </widget> + </item> + <item row="3" column="6"> + <widget class="QPushButton" name="btnCancelSettings"> + <property name="text"> + <string>Cancel</string> + </property> + </widget> </item> - <item> - <spacer> - <property name="orientation" > + <item row="2" column="6"> + <widget class="QPushButton" name="btnSaveSettings"> + <property name="text"> + <string>Save</string> + </property> + </widget> + </item> + <item row="2" column="5"> + <spacer name="horizontalSpacer"> + <property name="orientation"> <enum>Qt::Horizontal</enum> </property> - <property name="sizeHint" > + <property name="sizeHint" stdset="0"> <size> - <width>21</width> + <width>40</width> <height>20</height> </size> </property> </spacer> </item> - <item> - <layout class="QVBoxLayout" > - <property name="margin" > - <number>0</number> + <item row="2" column="1" rowspan="2" colspan="4"> + <widget class="QFrame" name="frmOpacity"> + <property name="frameShape"> + <enum>QFrame::NoFrame</enum> </property> - <property name="spacing" > - <number>1</number> + <property name="frameShadow"> + <enum>QFrame::Plain</enum> </property> - <item> - <widget class="QPushButton" name="btnSaveSettings" > - <property name="text" > - <string>Save</string> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="btnCancelSettings" > - <property name="text" > - <string>Cancel</string> - </property> - </widget> - </item> - </layout> + <property name="lineWidth"> + <number>0</number> + </property> + <layout class="QGridLayout" name="gridLayout3"> + <property name="margin"> + <number>0</number> + </property> + <property name="spacing"> + <number>-1</number> + </property> + <item row="0" column="0" colspan="4"> + <widget class="QSlider" name="sldrOpacity"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="contextMenuPolicy"> + <enum>Qt::NoContextMenu</enum> + </property> + <property name="toolTip"> + <string>Changes the transparency of the Bandwidth Graph</string> + </property> + <property name="minimum"> + <number>30</number> + </property> + <property name="maximum"> + <number>100</number> + </property> + <property name="value"> + <number>100</number> + </property> + <property name="sliderPosition"> + <number>100</number> + </property> + <property name="tracking"> + <bool>false</bool> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="invertedAppearance"> + <bool>false</bool> + </property> + <property name="tickPosition"> + <enum>QSlider::NoTicks</enum> + </property> + <property name="tickInterval"> + <number>10</number> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QLabel" name="lblPercentOpacity"> + <property name="minimumSize"> + <size> + <width>25</width> + <height>0</height> + </size> + </property> + <property name="font"> + <font> + <pointsize>10</pointsize> + </font> + </property> + <property name="contextMenuPolicy"> + <enum>Qt::NoContextMenu</enum> + </property> + <property name="layoutDirection"> + <enum>Qt::RightToLeft</enum> + </property> + <property name="text"> + <string>100</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item row="1" column="2"> + <widget class="QLabel" name="label"> + <property name="font"> + <font> + <pointsize>10</pointsize> + </font> + </property> + <property name="contextMenuPolicy"> + <enum>Qt::NoContextMenu</enum> + </property> + <property name="text"> + <string>% Opaque</string> + </property> + </widget> + </item> + <item row="1" column="3"> + <spacer> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item row="1" column="0"> + <spacer name="horizontalSpacer_2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> </item> </layout> </widget> </item> </layout> </widget> - <widget class="QStatusBar" name="statusbar" /> + <widget class="QStatusBar" name="statusbar"/> </widget> <customwidgets> <customwidget> <class>GraphFrame</class> <extends>QFrame</extends> <header>bwgraph/GraphFrame.h</header> + <container>1</container> </customwidget> </customwidgets> - <resources> - <include location="../res/vidalia_common.qrc" /> - </resources> <tabstops> <tabstop>btnToggleSettings</tabstop> <tabstop>btnReset</tabstop> - <tabstop>chkReceiveRate</tabstop> - <tabstop>chkSendRate</tabstop> - <tabstop>chkAlwaysOnTop</tabstop> - <tabstop>cmbGraphStyle</tabstop> - <tabstop>sldrOpacity</tabstop> - <tabstop>btnSaveSettings</tabstop> - <tabstop>btnCancelSettings</tabstop> </tabstops> + <resources> + <include location="../res/vidalia_common.qrc"/> + </resources> <connections/> </ui>