mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
[Preferences] Fixed size of dialog on low-res screens.
Preferences content moved into QScrollArea Closes #818
This commit is contained in:
parent
6604be5f53
commit
08f3456e28
|
@ -3,6 +3,7 @@ Version 1.5.0
|
|||
* added support for Proxy Auto-Config (PAC)
|
||||
* added option to open another private window from private window
|
||||
* added delete action in edit context menu on page
|
||||
* fixed: size of preferences dialog on low-res screens
|
||||
|
||||
Version 1.4.1
|
||||
* released 15 March 2013
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
#include <QMessageBox>
|
||||
#include <QCloseEvent>
|
||||
#include <QColorDialog>
|
||||
#include <QDesktopWidget>
|
||||
|
||||
Preferences::Preferences(QupZilla* mainClass, QWidget* parent)
|
||||
: QDialog(parent)
|
||||
|
@ -460,6 +461,16 @@ Preferences::Preferences(QupZilla* mainClass, QWidget* parent)
|
|||
ui->version->setText(" QupZilla v" + QupZilla::VERSION);
|
||||
ui->listWidget->setCurrentRow(currentSettingsPage);
|
||||
|
||||
QDesktopWidget* desktop = QApplication::desktop();
|
||||
QSize s = size();
|
||||
if (desktop->availableGeometry(this).size().width() < s.width()) {
|
||||
s.setWidth(desktop->availableGeometry(this).size().width() - 50);
|
||||
}
|
||||
if (desktop->availableGeometry(this).size().height() < s.height()) {
|
||||
s.setHeight(desktop->availableGeometry(this).size().height() - 50);
|
||||
}
|
||||
resize(s);
|
||||
|
||||
#if QTWEBKIT_TO_2_3
|
||||
ui->caretBrowsing->setHidden(true);
|
||||
ui->animateScrolling->setHidden(true);
|
||||
|
@ -485,12 +496,6 @@ void Preferences::showStackedPage(QListWidgetItem* item)
|
|||
if (index == 10) {
|
||||
m_pluginsList->load();
|
||||
}
|
||||
|
||||
// Update size
|
||||
QWidget* w = ui->stackedWidget->currentWidget();
|
||||
if (w) {
|
||||
w->setMinimumSize(w->sizeHint());
|
||||
}
|
||||
}
|
||||
|
||||
void Preferences::setNotificationPreviewVisible(bool state)
|
||||
|
|
|
@ -6,46 +6,15 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>531</height>
|
||||
<width>840</width>
|
||||
<height>554</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Preferences</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="caption"/>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="2">
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" colspan="2">
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QLabel" name="version">
|
||||
<property name="text">
|
||||
<string>QupZilla</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="2">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" rowspan="7">
|
||||
<item row="0" column="0" rowspan="5">
|
||||
<widget class="QListWidget" name="listWidget">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
|
@ -148,7 +117,38 @@
|
|||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="caption"/>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="2">
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="2">
|
||||
<widget class="QScrollArea" name="scrollArea">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="scrollAreaWidgetContents">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>596</width>
|
||||
<height>456</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="stackedWidget">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
|
@ -2638,6 +2638,31 @@
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" colspan="2">
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="version">
|
||||
<property name="text">
|
||||
<string>QupZilla</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>MacToolButton</class>
|
||||
|
|
Loading…
Reference in New Issue
Block a user