summaryrefslogtreecommitdiffstats
path: root/tdegtk/tdegtk-theme.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tdegtk/tdegtk-theme.cpp')
-rw-r--r--tdegtk/tdegtk-theme.cpp28
1 files changed, 15 insertions, 13 deletions
diff --git a/tdegtk/tdegtk-theme.cpp b/tdegtk/tdegtk-theme.cpp
index d52a5f0..fe4db01 100644
--- a/tdegtk/tdegtk-theme.cpp
+++ b/tdegtk/tdegtk-theme.cpp
@@ -42,6 +42,10 @@ void initTDESettings();
void writeGtkThemeControlFile(int forceRecreate);
int m_scrollBarSubLineWidth = -1;
+bool m_scrollbarBack1 = false;
+bool m_scrollbarForward1 = false;
+bool m_scrollbarBack2 = false;
+bool m_scrollbarForward2 = false;
extern "C" {
#include <gmodule.h>
@@ -567,19 +571,14 @@ void writeGtkThemeControlFile(int forceRecreate) {
// and asking the style which subcontrol is at that location.
TQRect rect = tqApp->style().querySubControlMetrics(TQStyle::CC_ScrollBar, &sbar, TQStyle::SC_ScrollBarGroove);
- bool back1 = false;
- bool forward1 = false;
- bool back2 = false;
- bool forward2 = false;
-
TQStyle::SubControl sc = TQStyle::SC_None;
for (TQPoint pos(0,7) ; pos.x()<rect.x() ; pos.setX(pos.x()+1))
{
TQStyle::SubControl sc2 = tqApp->style().querySubControl(TQStyle::CC_ScrollBar, &sbar, pos);
if (sc != sc2)
{
- if (sc2 == TQStyle::SC_ScrollBarAddLine) forward1 = true;
- if (sc2 == TQStyle::SC_ScrollBarSubLine) back1 = true;
+ if (sc2 == TQStyle::SC_ScrollBarAddLine) m_scrollbarForward1 = true;
+ if (sc2 == TQStyle::SC_ScrollBarSubLine) m_scrollbarBack1 = true;
sc = sc2;
}
}
@@ -589,12 +588,15 @@ void writeGtkThemeControlFile(int forceRecreate) {
TQStyle::SubControl sc2 = tqApp->style().querySubControl(TQStyle::CC_ScrollBar, &sbar, pos);
if (sc != sc2)
{
- if (sc2 == TQStyle::SC_ScrollBarAddLine) forward2 = true;
- if (sc2 == TQStyle::SC_ScrollBarSubLine) back2 = true;
+ if (sc2 == TQStyle::SC_ScrollBarAddLine) m_scrollbarForward2 = true;
+ if (sc2 == TQStyle::SC_ScrollBarSubLine) m_scrollbarBack2 = true;
sc = sc2;
}
}
+ // FIXME
+ // The items in a GTK3 combobox cannot be styled, either to draw them in a custom manner or to change their height
+ // A bug report should be filed on this issue...
bool combobox_appears_as_list = (!(tqApp->style().styleHint(TQStyle::SH_ComboBox_Popup) || tqApp->style().styleHint(TQStyle::SH_GUIStyle) == TQt::MotifStyle));
stream << parse_rc_string(TQString("-GtkComboBox-appears-as-list: %1px").arg(combobox_appears_as_list), "*");
@@ -605,10 +607,10 @@ void writeGtkThemeControlFile(int forceRecreate) {
stream << parse_rc_string("-GtkComboBox-arrow-size: " + TQString::number(tqApp->style().pixelMetric(TQStyle::PM_ArrowSize)), "*");
stream << parse_rc_string("-GtkComboBox-arrow-scaling: 0", "*");
- stream << parse_rc_string(TQString("-GtkScrollbar-has-backward-stepper: ") + (back1 ? "1" : "0"), "*");
- stream << parse_rc_string(TQString("-GtkScrollbar-has-forward-stepper: ") + (forward2 ? "1" : "0"), "*");
- stream << parse_rc_string(TQString("-GtkScrollbar-has-secondary-forward-stepper: ") + (forward1 ? "1" : "0"), "*");
- stream << parse_rc_string(TQString("-GtkScrollbar-has-secondary-backward-stepper: ") + (back2 ? "1" : "0"), "*");
+ stream << parse_rc_string(TQString("-GtkScrollbar-has-backward-stepper: ") + (m_scrollbarBack1 ? "1" : "0"), "*");
+ stream << parse_rc_string(TQString("-GtkScrollbar-has-forward-stepper: ") + (m_scrollbarForward2 ? "1" : "0"), "*");
+ stream << parse_rc_string(TQString("-GtkScrollbar-has-secondary-forward-stepper: ") + (m_scrollbarForward1 ? "1" : "0"), "*");
+ stream << parse_rc_string(TQString("-GtkScrollbar-has-secondary-backward-stepper: ") + (m_scrollbarBack2 ? "1" : "0"), "*");
m_scrollBarSubLineWidth = tqApp->style().querySubControlMetrics(TQStyle::CC_ScrollBar, &sbar, TQStyle::SC_ScrollBarSubLine).width();