diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mainwindow.cpp | 16 | ||||
-rw-r--r-- | src/rekonq.kcfg | 3 | ||||
-rw-r--r-- | src/settings/settings_fonts.ui | 19 |
3 files changed, 34 insertions, 4 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 420015d8..137f0f2c 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -468,14 +468,15 @@ void MainWindow::setupSidePanel() // setup side panel actions KAction* a = (KAction *) m_sidePanel->toggleViewAction(); - a->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_H)); // WARNING : is this the right shortcut ?? + a->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_H)); a->setIcon(KIcon("view-history")); actionCollection()->addAction(QLatin1String("show_history_panel"), a); } + void MainWindow::setupBookmarksPanel() { - m_bookmarksPanel = new BookmarksPanel(i18n("Bookmarks Panel"), this); + m_bookmarksPanel = new BookmarksPanel(i18n("Bookmarks Panel"), this); connect(m_bookmarksPanel, SIGNAL(openUrl(const KUrl&)), Application::instance(), SLOT(loadUrl(const KUrl&))); connect(m_bookmarksPanel, SIGNAL(destroyed()), Application::instance(), SLOT(saveConfiguration())); @@ -483,7 +484,7 @@ void MainWindow::setupBookmarksPanel() // setup side panel actions KAction* a = (KAction *) m_bookmarksPanel->toggleViewAction(); - a->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_B)); // FIXME: this shortcut should be configurable ! + a->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_B)); a->setIcon(KIcon("bookmarks-organize")); actionCollection()->addAction(QLatin1String("show_bookmarks_panel"), a); } @@ -498,10 +499,17 @@ void MainWindow::updateConfiguration() QWebSettings *defaultSettings = QWebSettings::globalSettings(); int fnSize = ReKonfig::fontSize(); + int minFnSize = ReKonfig::minFontSize(); + + // font size / dpi WARNING: is this right? why we need this? + float toPix = m_view->logicalDpiY()/72.0; + if (toPix < 96.0/72.0) + toPix = 96.0/72.0; QFont standardFont = ReKonfig::standardFont(); defaultSettings->setFontFamily(QWebSettings::StandardFont, standardFont.family()); - defaultSettings->setFontSize(QWebSettings::DefaultFontSize, fnSize); + defaultSettings->setFontSize(QWebSettings::DefaultFontSize, fnSize*toPix); + defaultSettings->setFontSize(QWebSettings::MinimumFontSize, minFnSize*toPix); QFont fixedFont = ReKonfig::fixedFont(); defaultSettings->setFontFamily(QWebSettings::FixedFont, fixedFont.family()); diff --git a/src/rekonq.kcfg b/src/rekonq.kcfg index 500c06b7..cc9c4317 100644 --- a/src/rekonq.kcfg +++ b/src/rekonq.kcfg @@ -71,6 +71,9 @@ <entry name="fontSize" type="Int"> <default>16</default> </entry> + <entry name="minFontSize" type="Int"> + <default>8</default> + </entry> </group> <!-- Privacy Settings --> diff --git a/src/settings/settings_fonts.ui b/src/settings/settings_fonts.ui index 98efce16..3f9aa9ef 100644 --- a/src/settings/settings_fonts.ui +++ b/src/settings/settings_fonts.ui @@ -67,6 +67,20 @@ </item> </layout> </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout2"> + <item> + <widget class="QLabel" name="label_4"> + <property name="text"> + <string>Minimal font size:</string> + </property> + </widget> + </item> + <item> + <widget class="QSpinBox" name="kcfg_minFontSize"/> + </item> + </layout> + </item> </layout> </widget> </item> @@ -91,6 +105,11 @@ <extends>KComboBox</extends> <header>kfontcombobox.h</header> </customwidget> + <customwidget> + <class>KComboBox</class> + <extends>QComboBox</extends> + <header>kcombobox.h</header> + </customwidget> </customwidgets> <resources/> <connections/> |