summaryrefslogtreecommitdiffstats
path: root/src/gui/styles
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/styles')
-rw-r--r--src/gui/styles/gtksymbols.cpp9
-rw-r--r--src/gui/styles/qcommonstyle.cpp2
-rw-r--r--src/gui/styles/qplastiquestyle.cpp2
-rw-r--r--src/gui/styles/qs60style.cpp11
4 files changed, 13 insertions, 11 deletions
diff --git a/src/gui/styles/gtksymbols.cpp b/src/gui/styles/gtksymbols.cpp
index d62f717..6ec5796 100644
--- a/src/gui/styles/gtksymbols.cpp
+++ b/src/gui/styles/gtksymbols.cpp
@@ -984,15 +984,18 @@ QIcon QGtk::getFilesystemIcon(const QFileInfo &info)
if (QGtk::gnome_vfs_init && QGtk::gnome_icon_lookup_sync) {
QGtk::gnome_vfs_init();
GtkIconTheme *theme = QGtk::gtk_icon_theme_get_default();
- QString fileurl = QUrl::fromLocalFile(info.absoluteFilePath()).toEncoded();
+ QByteArray fileurl = QUrl::fromLocalFile(info.absoluteFilePath()).toEncoded();
char * icon_name = QGtk::gnome_icon_lookup_sync(theme,
NULL,
- qPrintable(fileurl),
+ fileurl.data(),
NULL,
GNOME_ICON_LOOKUP_FLAGS_NONE,
NULL);
- return QIcon::fromTheme(icon_name);
+ QString iconName = QString::fromUtf8(icon_name);
g_free(icon_name);
+ if (iconName.startsWith(QLatin1Char('/')))
+ return QIcon(iconName);
+ return QIcon::fromTheme(iconName);
}
return icon;
}
diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp
index 612258a..5886512 100644
--- a/src/gui/styles/qcommonstyle.cpp
+++ b/src/gui/styles/qcommonstyle.cpp
@@ -5058,7 +5058,7 @@ int QCommonStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget
break;
case SH_ItemView_ActivateItemOnSingleClick:
- ret = false;
+ ret = qt_guiPlatformPlugin()->platformHint(QGuiPlatformPlugin::PH_ItemView_ActivateItemOnSingleClick);
break;
case SH_TitleBar_ModifyNotification:
diff --git a/src/gui/styles/qplastiquestyle.cpp b/src/gui/styles/qplastiquestyle.cpp
index 5052755..ce2109a 100644
--- a/src/gui/styles/qplastiquestyle.cpp
+++ b/src/gui/styles/qplastiquestyle.cpp
@@ -3309,7 +3309,7 @@ void QPlastiqueStyle::drawControl(ControlElement element, const QStyleOption *op
// Draw the text centered
QFont font = painter->font();
- font.setPointSize(font.pointSize() - 1);
+ font.setPointSize(QFontInfo(font).pointSize() - 1);
painter->setFont(font);
painter->setPen(dockWidget->palette.windowText().color());
painter->drawText(titleRect,
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index 6bdb79e..4fa1d03 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -706,11 +706,10 @@ void QS60StylePrivate::setThemePalette(QPalette *palette) const
palette->setColor(QPalette::AlternateBase, Qt::transparent);
palette->setBrush(QPalette::Base, Qt::transparent);
// set button and tooltipbase based on pixel colors
-// After natitive pixmap support, colorFromFrameGraphics caused reproducable crashes on some setups.
-// const QColor buttonColor = colorFromFrameGraphics(SF_ButtonNormal);
-// palette->setColor(QPalette::Button, buttonColor);
-// const QColor toolTipColor = colorFromFrameGraphics(SF_ToolTip);
-// palette->setColor(QPalette::ToolTipBase, toolTipColor);
+ const QColor buttonColor = colorFromFrameGraphics(SF_ButtonNormal);
+ palette->setColor(QPalette::Button, buttonColor);
+ const QColor toolTipColor = colorFromFrameGraphics(SF_ToolTip);
+ palette->setColor(QPalette::ToolTipBase, toolTipColor);
palette->setColor(QPalette::Light, palette->color(QPalette::Button).lighter());
palette->setColor(QPalette::Dark, palette->color(QPalette::Button).darker());
palette->setColor(QPalette::Midlight, palette->color(QPalette::Button).lighter(125));
@@ -1865,7 +1864,7 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
painter->save();
painter->setRenderHint(QPainter::Antialiasing);
painter->setOpacity(opacity);
- painter->setPen(QPen(option->palette.color(QPalette::Highlight), penWidth));
+ painter->setPen(QPen(option->palette.color(QPalette::Text), penWidth));
painter->drawRoundedRect(adjustedRect, roundRectRadius, roundRectRadius);
painter->restore();
}