Skip to content

Commit

Permalink
AdBlock dialog: use a simple check box instead of a group box.
Browse files Browse the repository at this point in the history
This gets rid the frame (of the group box) which essentially almost
cover the entire dialog. It looks better without the frame.
  • Loading branch information
ariya authored and icefox committed Jan 31, 2010
1 parent 3dd490e commit 8ef3a78
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/adblock/adblockdialog.cpp
Expand Up @@ -51,8 +51,8 @@ AdBlockDialog::AdBlockDialog(QWidget *parent)
m_proxyModel, SLOT(setFilterFixedString(QString)));

AdBlockManager *manager = AdBlockManager::instance();
adblockGroupBox->setChecked(manager->isEnabled());
connect(adblockGroupBox, SIGNAL(toggled(bool)),
adblockCheckBox->setChecked(manager->isEnabled());
connect(adblockCheckBox, SIGNAL(toggled(bool)),
AdBlockManager::instance(), SLOT(setEnabled(bool)));

QMenu *menu = new QMenu(this);
Expand Down
45 changes: 34 additions & 11 deletions src/adblock/adblockdialog.ui
Expand Up @@ -6,20 +6,27 @@
<rect>
<x>0</x>
<y>0</y>
<width>627</width>
<height>639</height>
<width>483</width>
<height>322</height>
</rect>
</property>
<property name="windowTitle">
<string>AdBlock Configuration</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0" colspan="2">
<widget class="QGroupBox" name="adblockGroupBox">
<property name="title">
<item row="0" column="0">
<widget class="QCheckBox" name="adblockCheckBox">
<property name="text">
<string>Enable AdBlock</string>
</property>
<property name="checkable">
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QWidget" name="adblockWidget" native="true">
<property name="enabled">
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout">
Expand Down Expand Up @@ -65,7 +72,7 @@
</layout>
</widget>
</item>
<item row="1" column="1">
<item row="2" column="0">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
Expand Down Expand Up @@ -98,8 +105,8 @@
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
<x>75</x>
<y>495</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
Expand All @@ -114,14 +121,30 @@
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
<x>75</x>
<y>495</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>adblockCheckBox</sender>
<signal>toggled(bool)</signal>
<receiver>adblockWidget</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>106</x>
<y>39</y>
</hint>
<hint type="destinationlabel">
<x>349</x>
<y>74</y>
</hint>
</hints>
</connection>
</connections>
</ui>

0 comments on commit 8ef3a78

Please sign in to comment.