Compare commits

...

9 Commits

Author SHA1 Message Date
Slávek Banko cbbdb0acd8 Update final HTML install path so all modules are consistent. 13 years ago
Slávek Banko c602b47342 Fix localization files name
Thanks to Francois Andriot for notice
(cherry picked from commit 29e73fb83e)
13 years ago
Darrell Anderson 8f904bc61e Fix "Only <glib.h> can be included directly" build errors.
(cherry picked from commit 1525fb2fb1)
13 years ago
Slávek Banko 3e7d4d52ba Prevent from registering with DCOP
This resolves Bug 956
(cherry picked from commit a1380ee80e)
13 years ago
Timothy Pearson 3cddfb67a2 Rename a few stragglers
(cherry picked from commit 90085d290f)
13 years ago
Timothy Pearson c9aeaa2c7c Rename obsolete tq methods to standard names
(cherry picked from commit fae91e75ec)
13 years ago
Timothy Pearson f61ae9f4cc Remove additional unneeded tq method conversions
(cherry picked from commit a2f8e999d0)
13 years ago
Timothy Pearson 7c81f8c31a Rename old tq methods that no longer need a unique name
(cherry picked from commit 8b600a29ba)
13 years ago
Slávek Banko fe97cd6004 Add common directories 13 years ago

6
.gitmodules vendored

@ -0,0 +1,6 @@
[submodule "admin"]
path = admin
url = http://system@scm.trinitydesktop.org/scm/git/tde-common-admin
[submodule "cmake"]
path = cmake
url = http://system@scm.trinitydesktop.org/scm/git/tde-common-cmake

@ -0,0 +1 @@
Subproject commit dcb06c93597c65cebdfeb257588aaaa8b7c62ffd

@ -0,0 +1 @@
Subproject commit 43ef41ffd6d6e6505185d7fb09d2bed096fcb483

@ -186,7 +186,7 @@ When enabled, they will override the standard keyboard shortcuts in GTK applicat
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout13</cstring>
<cstring>layout13</cstring>
</property>
<hbox>
<property name="name">
@ -202,7 +202,7 @@ When enabled, they will override the standard keyboard shortcuts in GTK applicat
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>101</width>
<height>21</height>

@ -175,7 +175,7 @@ KcmGtk::KcmGtk(TQWidget *parent, const char *name, const TQStringList&)
gtkSearchPaths = config->readListEntry("gtkSearchPaths", gtkSearchPathsDefault);
// Add the widget to our tqlayout
// Add the widget to our layout
TQBoxLayout* l = new TQVBoxLayout(this);
widget = new KcmGtkWidget(this);
l->addWidget(widget);
@ -268,7 +268,7 @@ void KcmGtk::updateFontPreview()
{
widget->fontPreview->setFont(font);
widget->fontPreview->setText(
i18n("%1 (size %2)").tqarg(font.family()).tqarg(TQString::number(font.pointSize())));
i18n("%1 (size %2)").arg(font.family()).arg(TQString::number(font.pointSize())));
widget->fontPreview2->setFont(font);
}
@ -554,7 +554,7 @@ TQString KcmGtk::scrollBarCSS()
sbar.setValue(1);
sbar.resize(200,25);
TQRect rect = tqApp->tqstyle().querySubControlMetrics(TQStyle::CC_ScrollBar, &sbar, TQStyle::SC_ScrollBarGroove);
TQRect rect = tqApp->style().querySubControlMetrics(TQStyle::CC_ScrollBar, &sbar, TQStyle::SC_ScrollBarGroove);
bool back1 = false;
bool forward1 = false;
@ -564,7 +564,7 @@ TQString KcmGtk::scrollBarCSS()
TQStyle::SubControl sc = TQStyle::SC_None;
for (TQPoint pos(0,7) ; pos.x()<rect.x() ; pos.setX(pos.x()+1))
{
TQStyle::SubControl sc2 = tqApp->tqstyle().querySubControl(TQStyle::CC_ScrollBar, &sbar, pos);
TQStyle::SubControl sc2 = tqApp->style().querySubControl(TQStyle::CC_ScrollBar, &sbar, pos);
if (sc != sc2)
{
if (sc2 == TQStyle::SC_ScrollBarAddLine) forward1 = true;
@ -575,7 +575,7 @@ TQString KcmGtk::scrollBarCSS()
sc = TQStyle::SC_None;
for (TQPoint pos(rect.x()+rect.width(),7) ; pos.x()<200 ; pos.setX(pos.x()+1))
{
TQStyle::SubControl sc2 = tqApp->tqstyle().querySubControl(TQStyle::CC_ScrollBar, &sbar, pos);
TQStyle::SubControl sc2 = tqApp->style().querySubControl(TQStyle::CC_ScrollBar, &sbar, pos);
if (sc != sc2)
{
if (sc2 == TQStyle::SC_ScrollBarAddLine) forward2 = true;
@ -627,7 +627,7 @@ void KcmGtk::writeFirefoxCSS(const TQString& path, const TQString& data)
if (!file.open(IO_WriteOnly | IO_Truncate))
{
KMessageBox::error(this, i18n("Could not write to %1").tqarg(path), i18n("Mozilla profile"));
KMessageBox::error(this, i18n("Could not write to %1").arg(path), i18n("Mozilla profile"));
return;
}
TQTextStream stream(&file);

@ -43,7 +43,7 @@
</property>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout12</cstring>
<cstring>layout12</cstring>
</property>
<vbox>
<property name="name">
@ -67,7 +67,7 @@
<property name="sizeType">
<enum>Minimum</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>16</height>
@ -78,7 +78,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout17</cstring>
<cstring>layout17</cstring>
</property>
<grid>
<property name="name">
@ -94,7 +94,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>150</width>
<height>21</height>
@ -103,7 +103,7 @@
</spacer>
<widget class="TQLayoutWidget" row="3" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>tqlayout16</cstring>
<cstring>layout16</cstring>
</property>
<hbox>
<property name="name">
@ -127,7 +127,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>176</width>
<height>20</height>
@ -215,7 +215,7 @@
</property>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout7_2</cstring>
<cstring>layout7_2</cstring>
</property>
<vbox>
<property name="name">
@ -239,7 +239,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>31</height>
@ -250,7 +250,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout14</cstring>
<cstring>layout14</cstring>
</property>
<grid>
<property name="name">
@ -274,7 +274,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>238</width>
<height>21</height>
@ -291,7 +291,7 @@
</widget>
<widget class="TQLayoutWidget" row="3" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>tqlayout10</cstring>
<cstring>layout10</cstring>
</property>
<hbox>
<property name="name">
@ -307,7 +307,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>10</height>
@ -337,7 +337,7 @@
</widget>
<widget class="TQLayoutWidget" row="2" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>tqlayout13</cstring>
<cstring>layout13</cstring>
</property>
<hbox>
<property name="name">
@ -353,7 +353,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>16</height>
@ -367,7 +367,7 @@
<property name="text">
<string>Preview line 1</string>
</property>
<property name="tqalignment">
<property name="alignment">
<set>AlignVCenter</set>
</property>
</widget>
@ -390,7 +390,7 @@
</property>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout10</cstring>
<cstring>layout10</cstring>
</property>
<vbox>
<property name="name">
@ -414,7 +414,7 @@
<property name="sizeType">
<enum>Minimum</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>21</width>
<height>10</height>
@ -425,7 +425,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout12</cstring>
<cstring>layout12</cstring>
</property>
<vbox>
<property name="name">
@ -444,7 +444,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout11</cstring>
<cstring>layout11</cstring>
</property>
<hbox>
<property name="name">
@ -468,7 +468,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>141</width>
<height>21</height>
@ -502,7 +502,7 @@
</property>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout7_2_2</cstring>
<cstring>layout7_2_2</cstring>
</property>
<vbox>
<property name="name">
@ -526,7 +526,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>31</height>
@ -537,7 +537,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout12</cstring>
<cstring>layout12</cstring>
</property>
<vbox>
<property name="name">
@ -550,13 +550,13 @@
<property name="text">
<string>Scrollbar buttons may sometimes be displayed incorrectly in Firefox and Thunderbird. This can be fixed by installing some files into your Mozilla profile.</string>
</property>
<property name="tqalignment">
<property name="alignment">
<set>WordBreak|AlignVCenter</set>
</property>
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout11</cstring>
<cstring>layout11</cstring>
</property>
<hbox>
<property name="name">
@ -580,7 +580,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>101</width>
<height>21</height>
@ -600,7 +600,7 @@
<property name="text">
<string>Note that changes made here will only affect GTK applications when KDE is running. To change the styles and fonts used by applications in GNOME, use the GNOME configuration tools.</string>
</property>
<property name="tqalignment">
<property name="alignment">
<set>WordBreak|AlignVCenter</set>
</property>
</widget>
@ -614,7 +614,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>51</width>
<height>16</height>

@ -26,7 +26,7 @@
<property name="text">
<string>The control center module could not find the GTK-Qt theme engine in its list of search paths. If you have installed it elsewhere, you will need to add the correct path to the list below.</string>
</property>
<property name="tqalignment">
<property name="alignment">
<set>WordBreak|AlignVCenter</set>
</property>
</widget>
@ -37,7 +37,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout31</cstring>
<cstring>layout31</cstring>
</property>
<hbox>
<property name="name">
@ -91,7 +91,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout33</cstring>
<cstring>layout33</cstring>
</property>
<hbox>
<property name="name">
@ -107,7 +107,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>51</width>
<height>20</height>

@ -176,6 +176,8 @@ void createTQApp()
"message goes here", 0 /* TODO: Website */, "kb9vqf@pearsoncomputing.net");
KCmdLineArgs::init(argc, argv, &aboutData);
KApplication::disableAutoDcopRegistration();
TQString cmdLine;
#ifdef USE_FREEBSD
@ -397,11 +399,11 @@ void createTQApp()
if (!gtkQtEnable)
return;
isBaghira = (TQString(tqApp->tqstyle().name()).lower() == "baghira");
isKeramik = (TQString(tqApp->tqstyle().name()).lower() == "keramik");
isAlloy = (TQString(tqApp->tqstyle().name()).lower() == "alloy");
isDomino = (TQString(tqApp->tqstyle().name()).lower() == "domino");
isPolyester = (TQString(tqApp->tqstyle().name()).lower() == "polyester");
isBaghira = (TQString(tqApp->style().name()).lower() == "baghira");
isKeramik = (TQString(tqApp->style().name()).lower() == "keramik");
isAlloy = (TQString(tqApp->style().name()).lower() == "alloy");
isDomino = (TQString(tqApp->style().name()).lower() == "domino");
isPolyester = (TQString(tqApp->style().name()).lower() == "polyester");
if (isDomino)
{
@ -410,7 +412,7 @@ void createTQApp()
sbar.setValue(1);
sbar.resize(200,25);
TQRect rect = tqApp->tqstyle().querySubControlMetrics(TQStyle::CC_ScrollBar, &sbar, TQStyle::SC_ScrollBarGroove);
TQRect rect = tqApp->style().querySubControlMetrics(TQStyle::CC_ScrollBar, &sbar, TQStyle::SC_ScrollBarGroove);
scrollBarSpacingLeft = rect.x();
scrollBarSpacingRight = 200 - rect.x() - rect.width();
}
@ -665,7 +667,7 @@ void drawButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int defa
iconHeight=gdk_pixbuf_get_height(pixbuf);
buttonicon = TQPixmap(iconWidth, iconHeight);
buttonicon_mask = TQBitmap(iconWidth, iconHeight);
buttonicon.fill(tqApp->tqpalette().active().background());
buttonicon.fill(tqApp->palette().active().background());
buttonicon_mask.fill(TQt::color0);
GdkPixmap* pix = gdk_pixmap_foreign_new(buttonicon.handle());
GdkBitmap* bmp = gdk_pixmap_foreign_new(buttonicon_mask.handle());
@ -701,7 +703,7 @@ void drawButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int defa
sflags |= TQStyle::Style_ButtonDefault;
button.setDefault(defaultButton);
painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().background());
painter.fillRect(0, 0, w, h, tqApp->palette().active().background());
button.setText(gwLabel);
if (tde_showIconsOnPushButtons)
@ -710,10 +712,10 @@ void drawButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int defa
button.setOn(sflags&TQStyle::Style_On);
// This emulates ::drawButton() in the Qt qbutton.cpp file
tqApp->tqstyle().tqdrawControl(TQStyle::CE_PushButton, &painter, &button,
TQRect(0,0,w,h), button.tqpalette().active(), sflags);
tqApp->tqstyle().tqdrawControl(TQStyle::CE_PushButtonLabel, &painter, &button,
tqApp->tqstyle().subRect(TQStyle::SR_PushButtonContents, &button),
tqApp->style().drawControl(TQStyle::CE_PushButton, &painter, &button,
TQRect(0,0,w,h), button.palette().active(), sflags);
tqApp->style().drawControl(TQStyle::CE_PushButtonLabel, &painter, &button,
tqApp->style().subRect(TQStyle::SR_PushButtonContents, &button),
button.colorGroup(), sflags);
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
@ -737,10 +739,10 @@ void drawButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int defa
sflags |= TQStyle::Style_ButtonDefault;
button.setDefault(defaultButton);
painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().background());
painter.fillRect(0, 0, w, h, tqApp->palette().active().background());
tqApp->tqstyle().tqdrawControl(TQStyle::CE_PushButton, &painter, &button,
TQRect(0,0,w,h), button.tqpalette().active(), sflags);
tqApp->style().drawControl(TQStyle::CE_PushButton, &painter, &button,
TQRect(0,0,w,h), button.palette().active(), sflags);
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h);
@ -786,15 +788,15 @@ void drawToolbar(GdkWindow* window, GtkStyle* style, GtkStateType state, int x,
if ((backgroundTile) && (!backgroundTile->isNull()))
painter.fillRect(0, 0, w1, h1, TQBrush(TQColor(255,255,255), *backgroundTile));
else
painter.fillRect(0, 0, w1, h1, tqApp->tqpalette().active().brush(TQColorGroup::Background));
painter.fillRect(0, 0, w1, h1, tqApp->palette().active().brush(TQColorGroup::Background));
tqApp->tqstyle().tqdrawPrimitive(TQStyle::PE_PanelDockWindow, &painter,
TQRect(0,0,w1,h1), tqApp->tqpalette().active(),sflags);
tqApp->style().tqdrawPrimitive(TQStyle::PE_PanelDockWindow, &painter,
TQRect(0,0,w1,h1), tqApp->palette().active(),sflags);
if (isKeramik)
{
tqApp->tqstyle().tqdrawPrimitive(TQStyle::PE_DockWindowSeparator, &painter,
TQRect(0,0,w1,h1), tqApp->tqpalette().active(),sflags);
tqApp->style().tqdrawPrimitive(TQStyle::PE_DockWindowSeparator, &painter,
TQRect(0,0,w1,h1), tqApp->palette().active(),sflags);
}
bitBlt(&p, 0, 0, &pixmap, 0, 0, w, h);
@ -841,10 +843,10 @@ void drawMenubar(GdkWindow* window, GtkStyle* style, GtkStateType state, int x,
if ((backgroundTile) && (!backgroundTile->isNull()))
painter.fillRect(0, 0, w1, h1, TQBrush(TQColor(255,255,255), *backgroundTile));
else
painter.fillRect(0, 0, w1, h1, tqApp->tqpalette().active().brush(TQColorGroup::Background));
painter.fillRect(0, 0, w1, h1, tqApp->palette().active().brush(TQColorGroup::Background));
tqApp->tqstyle().tqdrawPrimitive(TQStyle::PE_PanelMenuBar, &painter,
TQRect(0,0,w1,h1), tqApp->tqpalette().active(),sflags);
tqApp->style().tqdrawPrimitive(TQStyle::PE_PanelMenuBar, &painter,
TQRect(0,0,w1,h1), tqApp->palette().active(),sflags);
bitBlt(&p, 0, 0, &pixmap, 0, 0, w, h);
@ -874,8 +876,8 @@ void drawTab(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, int
if (state != GTK_STATE_ACTIVE)
sflags = TQStyle::Style_Selected;
painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().brush(TQColorGroup::Background));
tqApp->tqstyle().tqdrawControl(TQStyle::CE_TabBarTab, &painter, meepTabBar, TQRect(0,0,w,h), tqApp->tqpalette().active(), sflags, TQStyleOption(tab));
painter.fillRect(0, 0, w, h, tqApp->palette().active().brush(TQColorGroup::Background));
tqApp->style().drawControl(TQStyle::CE_TabBarTab, &painter, meepTabBar, TQRect(0,0,w,h), tqApp->palette().active(), sflags, TQStyleOption(tab));
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h);
@ -900,10 +902,10 @@ void drawVLine(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, in
TQPixmap pixmap(width, height);
TQPainter painter(&pixmap);
painter.fillRect(2, 0, width - 2, height, tqApp->tqpalette().active().brush(TQColorGroup::Background));
painter.setPen( tqApp->tqpalette().active().mid() );
painter.fillRect(2, 0, width - 2, height, tqApp->palette().active().brush(TQColorGroup::Background));
painter.setPen( tqApp->palette().active().mid() );
painter.drawLine( 0, 0, 0, height );
painter.setPen( tqApp->tqpalette().active().light() );
painter.setPen( tqApp->palette().active().light() );
painter.drawLine( 1, 0, 1, height );
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
@ -925,10 +927,10 @@ void drawHLine(GdkWindow* window, GtkStyle* style, GtkStateType state, int y, in
TQPixmap pixmap(width, height);
TQPainter painter(&pixmap);
painter.fillRect(0, 2, width, height-2, tqApp->tqpalette().active().brush(TQColorGroup::Background));
painter.setPen(tqApp->tqpalette().active().mid() );
painter.fillRect(0, 2, width, height-2, tqApp->palette().active().brush(TQColorGroup::Background));
painter.setPen(tqApp->palette().active().mid() );
painter.drawLine(0, 0, width, 0);
painter.setPen(tqApp->tqpalette().active().light());
painter.setPen(tqApp->palette().active().light());
painter.drawLine(0, 1, width, 1);
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
@ -951,8 +953,8 @@ void drawLineEdit(GdkWindow* window, GtkStyle* style, GtkStateType state, int ha
if (hasFocus)
sflags |= TQStyle::Style_HasFocus;
painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().base());
tqApp->tqstyle().tqdrawPrimitive(TQStyle::PE_PanelLineEdit, &painter, TQRect(0, 0, w, h), tqApp->tqpalette().active(), sflags, TQStyleOption(1,1));
painter.fillRect(0, 0, w, h, tqApp->palette().active().base());
tqApp->style().tqdrawPrimitive(TQStyle::PE_PanelLineEdit, &painter, TQRect(0, 0, w, h), tqApp->palette().active(), sflags, TQStyleOption(1,1));
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h);
@ -977,9 +979,9 @@ void drawFrame(GdkWindow* window, GtkStyle* style, GtkStateType state, GtkShadow
if ((backgroundTile) && (!backgroundTile->isNull()))
painter.fillRect(0, 0, w, h, TQBrush(TQColor(255,255,255), *backgroundTile));
else
painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().brush(TQColorGroup::Background));
painter.fillRect(0, 0, w, h, tqApp->palette().active().brush(TQColorGroup::Background));
tqApp->tqstyle().tqdrawPrimitive(TQStyle::PE_Panel, &painter, TQRect(0, 0, w, h), tqApp->tqpalette().active(), sflags, TQStyleOption(2,2) );
tqApp->style().tqdrawPrimitive(TQStyle::PE_Panel, &painter, TQRect(0, 0, w, h), tqApp->palette().active(), sflags, TQStyleOption(2,2) );
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h);
@ -1006,8 +1008,8 @@ void drawComboBox(GdkWindow* window, GtkStyle* style, GtkStateType state, int x,
if (state == GTK_STATE_PRELIGHT)
activeflags = TQStyle::Style_MouseOver;
painter.fillRect(0,0, w, h, tqApp->tqpalette().active().brush(TQColorGroup::Background));
tqApp->tqstyle().tqdrawComplexControl(TQStyle::CC_ComboBox, &painter, &cb, TQRect(0, 0, w, h), tqApp->tqpalette().active(), sflags, scflags, activeflags);
painter.fillRect(0,0, w, h, tqApp->palette().active().brush(TQColorGroup::Background));
tqApp->style().drawComplexControl(TQStyle::CC_ComboBox, &painter, &cb, TQRect(0, 0, w, h), tqApp->palette().active(), sflags, scflags, activeflags);
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h);
@ -1019,8 +1021,8 @@ void drawCheckBox(GdkWindow* window, GtkStyle* style, GtkStateType state, int ch
if (!gtkQtEnable)
return;
int realH = tqApp->tqstyle().tqpixelMetric(TQStyle::PM_IndicatorHeight);
int realW = tqApp->tqstyle().tqpixelMetric(TQStyle::PM_IndicatorWidth);
int realH = tqApp->style().pixelMetric(TQStyle::PM_IndicatorHeight);
int realW = tqApp->style().pixelMetric(TQStyle::PM_IndicatorWidth);
if ((realW < 1) || (realH < 1))
return;
@ -1032,8 +1034,8 @@ void drawCheckBox(GdkWindow* window, GtkStyle* style, GtkStateType state, int ch
TQStyle::SFlags sflags = stateToSFlags(state);
sflags |= (checked ? TQStyle::Style_On : TQStyle::Style_Off);
painter.fillRect(0, 0, realW, realH, tqApp->tqpalette().active().brush(TQColorGroup::Background));
tqApp->tqstyle().tqdrawControl(TQStyle::CE_CheckBox, &painter, &checkbox, TQRect(0, 0, realW, realH), tqApp->tqpalette().active(), sflags);
painter.fillRect(0, 0, realW, realH, tqApp->palette().active().brush(TQColorGroup::Background));
tqApp->style().drawControl(TQStyle::CE_CheckBox, &painter, &checkbox, TQRect(0, 0, realW, realH), tqApp->palette().active(), sflags);
// Qt checkboxes are usually bigger than GTK wants.
// We cheat, and draw them over the expected area.
@ -1055,8 +1057,8 @@ void drawMenuCheck(GdkWindow* window, GtkStyle* style, GtkStateType state, int x
/* A previous version of the function followed the sizehints exclusively
Now follow w and h provided by GTK, but if the checkmark is too big we might have to scale it */
/*
int w1 = checkbox.tqsizeHint().width();
int h1 = checkbox.tqsizeHint().height(); */
int w1 = checkbox.sizeHint().width();
int h1 = checkbox.sizeHint().height(); */
if ((w < 1) || (h < 1))
return;
@ -1072,8 +1074,8 @@ void drawMenuCheck(GdkWindow* window, GtkStyle* style, GtkStateType state, int x
else if ((backgroundTile) && (!backgroundTile->isNull()))
painter.fillRect(0, 0, w, h, TQBrush(TQColor(255,255,255), *backgroundTile));
else
painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().brush(TQColorGroup::Background));
tqApp->tqstyle().tqdrawPrimitive(TQStyle::PE_CheckMark, &painter, TQRect(0, 0, w, h), tqApp->tqpalette().active(), sflags);
painter.fillRect(0, 0, w, h, tqApp->palette().active().brush(TQColorGroup::Background));
tqApp->style().tqdrawPrimitive(TQStyle::PE_CheckMark, &painter, TQRect(0, 0, w, h), tqApp->palette().active(), sflags);
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h);
@ -1085,8 +1087,8 @@ void drawRadioButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int
if (!gtkQtEnable)
return;
int realH = tqApp->tqstyle().tqpixelMetric(TQStyle::PM_IndicatorHeight);
int realW = tqApp->tqstyle().tqpixelMetric(TQStyle::PM_IndicatorWidth);
int realH = tqApp->style().pixelMetric(TQStyle::PM_IndicatorHeight);
int realW = tqApp->style().pixelMetric(TQStyle::PM_IndicatorWidth);
if ((realW < 1) || (realH < 1))
return;
@ -1103,9 +1105,9 @@ void drawRadioButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int
else if ((backgroundTile) && (!backgroundTile->isNull()))
painter.fillRect(0, 0, realW, realH, TQBrush(TQColor(255,255,255), *backgroundTile));
else
painter.fillRect(0, 0, realW, realH, tqApp->tqpalette().active().brush(TQColorGroup::Background));
painter.fillRect(0, 0, realW, realH, tqApp->palette().active().brush(TQColorGroup::Background));
tqApp->tqstyle().tqdrawControl(TQStyle::CE_RadioButton, &painter, &radio, TQRect(0,0,realH,realW), tqApp->tqpalette().active(), sflags);
tqApp->style().drawControl(TQStyle::CE_RadioButton, &painter, &radio, TQRect(0,0,realH,realW), tqApp->palette().active(), sflags);
// Qt checkboxes are usually bigger than GTK wants.
// We cheat, and draw them over the expected area.
@ -1142,7 +1144,7 @@ void drawScrollBarSlider(GdkWindow* window, GtkStyle* style, GtkStateType state,
if (orientation == GTK_ORIENTATION_HORIZONTAL)
sflags |= TQStyle::Style_Horizontal;
tqApp->tqstyle().tqdrawPrimitive(TQStyle::PE_ScrollBarSlider, &painter, TQRect(0,0,wCorrected,hCorrected), tqApp->tqpalette().active(), sflags);
tqApp->style().tqdrawPrimitive(TQStyle::PE_ScrollBarSlider, &painter, TQRect(0,0,wCorrected,hCorrected), tqApp->palette().active(), sflags);
// The domino style doesn't draw the entire slider in PE_ScrollBarSlider
// We have to draw PE_ScrollBarAddPage and PE_ScrollBarSubPage and piece the bits together
@ -1166,11 +1168,11 @@ void drawScrollBarSlider(GdkWindow* window, GtkStyle* style, GtkStateType state,
}
TQPainter dominoPainter(&leftPix);
tqApp->tqstyle().tqdrawPrimitive(TQStyle::PE_ScrollBarSubPage, &dominoPainter, leftRect, tqApp->tqpalette().active(), sflags);
tqApp->style().tqdrawPrimitive(TQStyle::PE_ScrollBarSubPage, &dominoPainter, leftRect, tqApp->palette().active(), sflags);
dominoPainter.end();
dominoPainter.begin(&rightPix);
tqApp->tqstyle().tqdrawPrimitive(TQStyle::PE_ScrollBarAddPage, &dominoPainter, rightRect, tqApp->tqpalette().active(), sflags);
tqApp->style().tqdrawPrimitive(TQStyle::PE_ScrollBarAddPage, &dominoPainter, rightRect, tqApp->palette().active(), sflags);
if (orientation == GTK_ORIENTATION_HORIZONTAL)
{
@ -1243,7 +1245,7 @@ void drawScrollBar(GdkWindow* window, GtkStyle* style, GtkStateType state, int o
if (orientation == GTK_ORIENTATION_VERTICAL) {
TQRect r;
r = tqApp->tqstyle().querySubControlMetrics(TQStyle::CC_ScrollBar,
r = tqApp->style().querySubControlMetrics(TQStyle::CC_ScrollBar,
scrollBar, TQStyle::SC_ScrollBarSlider);
offset = r.y();
thumbSize = r.height();
@ -1258,17 +1260,17 @@ void drawScrollBar(GdkWindow* window, GtkStyle* style, GtkStateType state, int o
scrollBar->resize(w, h + thumbSize);
painter2.fillRect(0, 0, w, h + thumbSize,
tqApp->tqpalette().active().brush(TQColorGroup::Background));
tqApp->tqstyle().tqdrawComplexControl(TQStyle::CC_ScrollBar,
tqApp->palette().active().brush(TQColorGroup::Background));
tqApp->style().drawComplexControl(TQStyle::CC_ScrollBar,
&painter2, scrollBar, TQRect(0, 0, w, h+thumbSize),
tqApp->tqpalette().active(), sflags);
tqApp->palette().active(), sflags);
bitBlt(&pixmap, 0, 0, &tmpPixmap, 0, 0, w, offset, Qt::CopyROP);
bitBlt(&pixmap, 0, offset, &tmpPixmap, 0, offset + thumbSize,
w, h - offset, Qt::CopyROP);
} else {
TQRect r;
r = tqApp->tqstyle().querySubControlMetrics(TQStyle::CC_ScrollBar,
r = tqApp->style().querySubControlMetrics(TQStyle::CC_ScrollBar,
scrollBar, TQStyle::SC_ScrollBarSlider);
offset = r.x();
thumbSize = r.width();
@ -1283,10 +1285,10 @@ void drawScrollBar(GdkWindow* window, GtkStyle* style, GtkStateType state, int o
scrollBar->resize(w + thumbSize, h);
painter2.fillRect(0, 0, w + thumbSize, h,
tqApp->tqpalette().active().brush(TQColorGroup::Background));
tqApp->tqstyle().tqdrawComplexControl(TQStyle::CC_ScrollBar,
tqApp->palette().active().brush(TQColorGroup::Background));
tqApp->style().drawComplexControl(TQStyle::CC_ScrollBar,
&painter2, scrollBar, TQRect(0, 0, w+thumbSize, h),
tqApp->tqpalette().active(), sflags);
tqApp->palette().active(), sflags);
bitBlt(&pixmap, 0, 0, &tmpPixmap, 0, 0, offset, h, Qt::CopyROP);
bitBlt(&pixmap, offset, 0, &tmpPixmap, offset + thumbSize, 0,
@ -1310,8 +1312,8 @@ void drawToolButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int
button.resize(w, h);
/*
int realW = button.tqsizeHint().width();
int realH = button.tqsizeHint().height(); */
int realW = button.sizeHint().width();
int realH = button.sizeHint().height(); */
TQStyle::SFlags sflags = stateToSFlags(state);
TQStyle::SCFlags activeflags = TQStyle::SC_None;
@ -1329,8 +1331,8 @@ void drawToolButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int
if ((backgroundTile) && (!backgroundTile->isNull()))
painter.fillRect(0, 0, w, h, TQBrush(TQColor(255,255,255), *backgroundTile));
else
painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().brush(TQColorGroup::Background));
tqApp->tqstyle().tqdrawComplexControl(TQStyle::CC_ToolButton, &painter, &button, TQRect(0, 0, w, h), tqApp->tqpalette().active(), sflags, TQStyle::SC_ToolButton, activeflags);
painter.fillRect(0, 0, w, h, tqApp->palette().active().brush(TQColorGroup::Background));
tqApp->style().drawComplexControl(TQStyle::CC_ToolButton, &painter, &button, TQRect(0, 0, w, h), tqApp->palette().active(), sflags, TQStyle::SC_ToolButton, activeflags);
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h);
@ -1352,7 +1354,7 @@ void drawMenuBarItem(GdkWindow* window, GtkStyle* style, GtkStateType state, int
TQStyle::SFlags sflags = TQStyle::Style_Down | TQStyle::Style_Enabled | TQStyle::Style_Active | TQStyle::Style_HasFocus;
tqApp->tqstyle().tqdrawControl(TQStyle::CE_MenuBarItem, &painter, &mb, TQRect(0, 0, w, h), tqApp->tqpalette().active(), sflags, TQStyleOption(&mi));
tqApp->style().drawControl(TQStyle::CE_MenuBarItem, &painter, &mb, TQRect(0, 0, w, h), tqApp->palette().active(), sflags, TQStyleOption(&mi));
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h);
@ -1376,8 +1378,8 @@ void drawMenuItem(GdkWindow* window, GtkStyle* style, GtkStateType state, int x,
TQStyleOption opt(mi, 16, 16);
TQStyle::SFlags sflags = TQStyle::Style_Active | TQStyle::Style_Enabled;
painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().brush(TQColorGroup::Background));
tqApp->tqstyle().tqdrawControl(TQStyle::CE_PopupMenuItem, &painter, &pm, TQRect(0,0,w,h), tqApp->tqpalette().active(), sflags, opt);
painter.fillRect(0, 0, w, h, tqApp->palette().active().brush(TQColorGroup::Background));
tqApp->style().drawControl(TQStyle::CE_PopupMenuItem, &painter, &pm, TQRect(0,0,w,h), tqApp->palette().active(), sflags, opt);
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h);
@ -1399,8 +1401,8 @@ void drawSplitter(GdkWindow* window, GtkStyle* style, GtkStateType state, int or
// No idea why this works...
if (orientation != GTK_ORIENTATION_HORIZONTAL) sflags |= TQStyle::Style_Horizontal;
painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().brush(TQColorGroup::Background));
tqApp->tqstyle().tqdrawPrimitive(TQStyle::PE_Splitter, &painter, TQRect(0,0,w,h), tqApp->tqpalette().active(), sflags);
painter.fillRect(0, 0, w, h, tqApp->palette().active().brush(TQColorGroup::Background));
tqApp->style().tqdrawPrimitive(TQStyle::PE_Splitter, &painter, TQRect(0,0,w,h), tqApp->palette().active(), sflags);
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h);
@ -1424,15 +1426,15 @@ void drawTabFrame(GdkWindow* window, GtkStyle* style, GtkStateType state, int x,
if ((backgroundTile) && (!backgroundTile->isNull()))
painter.fillRect(0, 0, w, h, TQBrush(TQColor(255,255,255), *backgroundTile));
else
painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().brush(TQColorGroup::Background));
tqApp->tqstyle().tqdrawPrimitive(TQStyle::PE_PanelTabWidget, &painter, TQRect(0,0,w,h), tqApp->tqpalette().active(), sflags, opt);
painter.fillRect(0, 0, w, h, tqApp->palette().active().brush(TQColorGroup::Background));
tqApp->style().tqdrawPrimitive(TQStyle::PE_PanelTabWidget, &painter, TQRect(0,0,w,h), tqApp->palette().active(), sflags, opt);
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h);
g_object_unref(pix);
// Drawing tab base
int th = tqApp->tqstyle().tqpixelMetric(TQStyle::PM_TabBarBaseHeight, meepTabBar);
int th = tqApp->style().pixelMetric(TQStyle::PM_TabBarBaseHeight, meepTabBar);
int tw = w;
if ((tw < 1) || (th < 1))
@ -1443,10 +1445,10 @@ void drawTabFrame(GdkWindow* window, GtkStyle* style, GtkStateType state, int x,
if ((backgroundTile) && (!backgroundTile->isNull()))
painter1.fillRect(0, 0, tw, th, TQBrush(TQColor(255,255,255), *backgroundTile));
else
painter1.fillRect(0, 0, tw, th, tqApp->tqpalette().active().brush(TQColorGroup::Background));
painter1.fillRect(0, 0, tw, th, tqApp->palette().active().brush(TQColorGroup::Background));
tqApp->tqstyle().tqdrawPrimitive(TQStyle::PE_TabBarBase, &painter1, TQRect(0, 0, tw, th), tqApp->tqpalette().active(), sflags, TQStyleOption(1,1));
tqApp->style().tqdrawPrimitive(TQStyle::PE_TabBarBase, &painter1, TQRect(0, 0, tw, th), tqApp->palette().active(), sflags, TQStyleOption(1,1));
if (pos == GTK_POS_BOTTOM)
{
TQWMatrix m;
@ -1454,13 +1456,13 @@ void drawTabFrame(GdkWindow* window, GtkStyle* style, GtkStateType state, int x,
pixmap1 = pixmap1.xForm(m);
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap1.handle());
gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y+h+tqApp->tqstyle().tqpixelMetric(TQStyle::PM_TabBarBaseOverlap, meepTabBar), tw, th);
gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y+h+tqApp->style().pixelMetric(TQStyle::PM_TabBarBaseOverlap, meepTabBar), tw, th);
g_object_unref(pix);
}
else
{
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap1.handle());
gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y-tqApp->tqstyle().tqpixelMetric(TQStyle::PM_TabBarBaseOverlap, meepTabBar), tw, th);
gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y-tqApp->style().pixelMetric(TQStyle::PM_TabBarBaseOverlap, meepTabBar), tw, th);
g_object_unref(pix);
}
}
@ -1480,8 +1482,8 @@ void drawMenu(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, int
if ((backgroundTile) && (!backgroundTile->isNull()))
painter.fillRect(0, 0, w, h, TQBrush(TQColor(255,255,255), *backgroundTile));
else
painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().brush(TQColorGroup::Background));
tqApp->tqstyle().tqdrawPrimitive(TQStyle::PE_PanelPopup, &painter, TQRect(0,0,w,h), tqApp->tqpalette().active(), sflags);
painter.fillRect(0, 0, w, h, tqApp->palette().active().brush(TQColorGroup::Background));
tqApp->style().tqdrawPrimitive(TQStyle::PE_PanelPopup, &painter, TQRect(0,0,w,h), tqApp->palette().active(), sflags);
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h);
@ -1530,9 +1532,9 @@ void drawProgressChunk(GdkWindow * window, GtkStyle * style, GtkStateType state,
TQStyle::SFlags sflags = stateToSFlags(state);
painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().brush(TQColorGroup::Background));
painter.fillRect(0, 0, w, h, tqApp->palette().active().brush(TQColorGroup::Background));
tqApp->tqstyle().tqdrawControl(TQStyle::CE_ProgressBarContents, &painter, &bar, TQRect(0,0,w2,h2), tqApp->tqpalette().active(), sflags);
tqApp->style().drawControl(TQStyle::CE_ProgressBarContents, &painter, &bar, TQRect(0,0,w2,h2), tqApp->palette().active(), sflags);
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
if (isAlloy)
@ -1616,8 +1618,8 @@ void drawSpinButton(GdkWindow * window, GtkStyle * style, GtkStateType state, in
TQStyle::SFlags sflags = stateToSFlags(state);
painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().brush(TQColorGroup::Background));
tqApp->tqstyle().tqdrawPrimitive((direction ? TQStyle::PE_SpinWidgetDown : TQStyle::PE_SpinWidgetUp), &painter, TQRect(0,0,w,h), tqApp->tqpalette().active(), sflags);
painter.fillRect(0, 0, w, h, tqApp->palette().active().brush(TQColorGroup::Background));
tqApp->style().tqdrawPrimitive((direction ? TQStyle::PE_SpinWidgetDown : TQStyle::PE_SpinWidgetUp), &painter, TQRect(0,0,w,h), tqApp->palette().active(), sflags);
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h);
@ -1637,8 +1639,8 @@ void drawListHeader(GdkWindow* window, GtkStyle* style, GtkStateType state, int
TQStyle::SFlags sflags = stateToSFlags(state) | TQStyle::Style_Horizontal;
painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().brush(TQColorGroup::Background));
tqApp->tqstyle().tqdrawPrimitive(TQStyle::PE_HeaderSection, &painter, TQRect(0,0,w,h), tqApp->tqpalette().active(), sflags);
painter.fillRect(0, 0, w, h, tqApp->palette().active().brush(TQColorGroup::Background));
tqApp->style().tqdrawPrimitive(TQStyle::PE_HeaderSection, &painter, TQRect(0,0,w,h), tqApp->palette().active(), sflags);
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h);
@ -1683,10 +1685,10 @@ void drawSquareButton(GdkWindow* window, GtkStyle* style, GtkStateType state, in
else if ((backgroundTile) && (!backgroundTile->isNull()))
painter.fillRect(0, 0, 20, 20, TQBrush(TQColor(255,255,255), *backgroundTile));
else
painter.fillRect(0, 0, 20, 20, tqApp->tqpalette().active().brush(TQColorGroup::Background));
painter.fillRect(0, 0, 20, 20, tqApp->palette().active().brush(TQColorGroup::Background));
tqApp->tqstyle().tqdrawControl(TQStyle::CE_PushButton, &painter, &button,
TQRect(0,0,20,20), tqApp->tqpalette().active(), sflags);
tqApp->style().drawControl(TQStyle::CE_PushButton, &painter, &button,
TQRect(0,0,20,20), tqApp->palette().active(), sflags);
TQImage image = pixmap.convertToImage().smoothScale(w,h);
@ -1761,8 +1763,8 @@ void drawTabNG(GdkWindow *window, GtkStyle* style, GtkStateType state, int x, in
painter.fillRect(0, 0, w, h, TQBrush(TQColor(255,255,255), *backgroundTile));
else
painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().brush(TQColorGroup::Background));
tqApp->tqstyle().tqdrawControl(TQStyle::CE_TabBarTab, &painter, (TQTabBar *)meepTabBar, TQRect(0,0,w,h), tqApp->tqpalette().active(), sflags, TQStyleOption(tab));
painter.fillRect(0, 0, w, h, tqApp->palette().active().brush(TQColorGroup::Background));
tqApp->style().drawControl(TQStyle::CE_TabBarTab, &painter, (TQTabBar *)meepTabBar, TQRect(0,0,w,h), tqApp->palette().active(), sflags, TQStyleOption(tab));
painter.end(); // So the pixmap assignment below won't give an error
// Account for tab position -- if its in the bottom flip the image
@ -1811,9 +1813,9 @@ void drawArrow(GdkWindow* window, GtkStyle* style, GtkStateType state, GtkArrowT
else if ((backgroundTile) && (!backgroundTile->isNull()))
painter.fillRect(0, 0, w, h, TQBrush(TQColor(255,255,255), *backgroundTile));
else
painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().brush(TQColorGroup::Background));
painter.fillRect(0, 0, w, h, tqApp->palette().active().brush(TQColorGroup::Background));
tqApp->tqstyle().tqdrawPrimitive(element, &painter, TQRect(0,0,w,h), tqApp->tqpalette().active(), sflags);
tqApp->style().tqdrawPrimitive(element, &painter, TQRect(0,0,w,h), tqApp->palette().active(), sflags);
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h);
@ -1830,10 +1832,10 @@ void drawFocusRect(GdkWindow * window, GtkStyle * style, int x, int y, int w, in
TQPixmap pixmap(w,h);
TQPainter painter(&pixmap);
TQColor bg(tqApp->tqpalette().active().background());
TQColor bg(tqApp->palette().active().background());
painter.fillRect(0,0,w,h,bg);
tqApp->tqstyle().tqdrawPrimitive(TQStyle::PE_FocusRect, &painter, TQRect(0,0,w,h), tqApp->tqpalette().active(), TQStyle::Style_Default, TQStyleOption(bg));
tqApp->style().tqdrawPrimitive(TQStyle::PE_FocusRect, &painter, TQRect(0,0,w,h), tqApp->palette().active(), TQStyle::Style_Default, TQStyleOption(bg));
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
gdk_draw_drawable(window, style->bg_gc[GTK_STATE_NORMAL], pix, 0, 0, x, y, w, h);
@ -1974,34 +1976,34 @@ void setRcProperties(GtkRcStyle* rc_style, int forceRecreate)
// Set colors
// Normal
setColour("fg[NORMAL]", tqApp->tqpalette().active().text());
setColour("bg[NORMAL]", tqApp->tqpalette().active().background());
setColour("text[NORMAL]", tqApp->tqpalette().active().text());
setColour("base[NORMAL]", tqApp->tqpalette().active().base());
setColour("fg[NORMAL]", tqApp->palette().active().text());
setColour("bg[NORMAL]", tqApp->palette().active().background());
setColour("text[NORMAL]", tqApp->palette().active().text());
setColour("base[NORMAL]", tqApp->palette().active().base());
// Active (on)
setColour("fg[ACTIVE]", tqApp->tqpalette().active().text());
setColour("bg[ACTIVE]", tqApp->tqpalette().active().background());
setColour("text[ACTIVE]", tqApp->tqpalette().active().text());
setColour("base[ACTIVE]", tqApp->tqpalette().active().base());
setColour("fg[ACTIVE]", tqApp->palette().active().text());
setColour("bg[ACTIVE]", tqApp->palette().active().background());
setColour("text[ACTIVE]", tqApp->palette().active().text());
setColour("base[ACTIVE]", tqApp->palette().active().base());
// Mouseover
setColour("fg[PRELIGHT]", tqApp->tqpalette().active().text()); // menu items - change?
setColour("bg[PRELIGHT]", tqApp->tqpalette().active().highlight());
setColour("text[PRELIGHT]", tqApp->tqpalette().active().text());
setColour("base[PRELIGHT]", tqApp->tqpalette().active().base());
setColour("fg[PRELIGHT]", tqApp->palette().active().text()); // menu items - change?
setColour("bg[PRELIGHT]", tqApp->palette().active().highlight());
setColour("text[PRELIGHT]", tqApp->palette().active().text());
setColour("base[PRELIGHT]", tqApp->palette().active().base());
// Selected
setColour("fg[SELECTED]", tqApp->tqpalette().active().highlightedText());
setColour("bg[SELECTED]", tqApp->tqpalette().active().highlight());
setColour("text[SELECTED]", tqApp->tqpalette().active().highlightedText());
setColour("base[SELECTED]", tqApp->tqpalette().active().highlight());
setColour("fg[SELECTED]", tqApp->palette().active().highlightedText());
setColour("bg[SELECTED]", tqApp->palette().active().highlight());
setColour("text[SELECTED]", tqApp->palette().active().highlightedText());
setColour("base[SELECTED]", tqApp->palette().active().highlight());
// Disabled
setColour("fg[INSENSITIVE]", tqApp->tqpalette().disabled().text());
setColour("bg[INSENSITIVE]", tqApp->tqpalette().disabled().background());
setColour("text[INSENSITIVE]", tqApp->tqpalette().disabled().text());
setColour("base[INSENSITIVE]", tqApp->tqpalette().disabled().background());
setColour("fg[INSENSITIVE]", tqApp->palette().disabled().text());
setColour("bg[INSENSITIVE]", tqApp->palette().disabled().background());
setColour("text[INSENSITIVE]", tqApp->palette().disabled().text());
setColour("base[INSENSITIVE]", tqApp->palette().disabled().background());
gtk_rc_parse_string(("gtk-button-images = " + TQString::number(showIconsOnButtons)).latin1());
@ -2020,7 +2022,7 @@ void setRcProperties(GtkRcStyle* rc_style, int forceRecreate)
cacheFile.open(IO_ReadOnly);
stream.setDevice(TQT_TQIODEVICE(&cacheFile));
if (stream.readLine() == "# " + iconTheme + ", " + tqApp->tqstyle().name() + ", " + RC_CACHE_VERSION)
if (stream.readLine() == "# " + iconTheme + ", " + tqApp->style().name() + ", " + RC_CACHE_VERSION)
{
// This cache matches the current icon theme and style
// Let's load it and return
@ -2035,7 +2037,7 @@ void setRcProperties(GtkRcStyle* rc_style, int forceRecreate)
cacheFile.open(IO_WriteOnly | IO_Truncate);
stream.setDevice(TQT_TQIODEVICE(&cacheFile));
stream << "# " << iconTheme << ", " << tqApp->tqstyle().name() << ", " << RC_CACHE_VERSION << "\n\n";
stream << "# " << iconTheme << ", " << tqApp->style().name() << ", " << RC_CACHE_VERSION << "\n\n";
stream << "# This file was generated by the Gtk Qt Theme Engine\n";
stream << "# It will be recreated when you change your KDE icon theme or widget style\n\n";
@ -2047,7 +2049,7 @@ void setRcProperties(GtkRcStyle* rc_style, int forceRecreate)
// The following code determines how many buttons are on a scrollbar
// It works by looking at each pixel of the scrollbar's area not taken up by the groove,
// and asking the style which subcontrol is at that location.
TQRect rect = tqApp->tqstyle().querySubControlMetrics(TQStyle::CC_ScrollBar, &sbar, TQStyle::SC_ScrollBarGroove);
TQRect rect = tqApp->style().querySubControlMetrics(TQStyle::CC_ScrollBar, &sbar, TQStyle::SC_ScrollBarGroove);
bool back1 = false;
bool forward1 = false;
@ -2057,7 +2059,7 @@ void setRcProperties(GtkRcStyle* rc_style, int forceRecreate)
TQStyle::SubControl sc = TQStyle::SC_None;
for (TQPoint pos(0,7) ; pos.x()<rect.x() ; pos.setX(pos.x()+1))
{
TQStyle::SubControl sc2 = tqApp->tqstyle().querySubControl(TQStyle::CC_ScrollBar, &sbar, pos);
TQStyle::SubControl sc2 = tqApp->style().querySubControl(TQStyle::CC_ScrollBar, &sbar, pos);
if (sc != sc2)
{
if (sc2 == TQStyle::SC_ScrollBarAddLine) forward1 = true;
@ -2068,7 +2070,7 @@ void setRcProperties(GtkRcStyle* rc_style, int forceRecreate)
sc = TQStyle::SC_None;
for (TQPoint pos(rect.x()+rect.width(),7) ; pos.x()<200 ; pos.setX(pos.x()+1))
{
TQStyle::SubControl sc2 = tqApp->tqstyle().querySubControl(TQStyle::CC_ScrollBar, &sbar, pos);
TQStyle::SubControl sc2 = tqApp->style().querySubControl(TQStyle::CC_ScrollBar, &sbar, pos);
if (sc != sc2)
{
if (sc2 == TQStyle::SC_ScrollBarAddLine) forward2 = true;
@ -2082,13 +2084,13 @@ void setRcProperties(GtkRcStyle* rc_style, int forceRecreate)
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("GtkScrollbar::stepper-size = " + TQString::number(tqApp->tqstyle().querySubControlMetrics(TQStyle::CC_ScrollBar, &sbar, TQStyle::SC_ScrollBarSubLine).width() - 1), "*");
stream << parse_rc_string("GtkScrollbar::stepper-size = " + TQString::number(tqApp->style().querySubControlMetrics(TQStyle::CC_ScrollBar, &sbar, TQStyle::SC_ScrollBarSubLine).width() - 1), "*");
stream << parse_rc_string("GtkScrollbar::min-slider-length = " + TQString::number(tqApp->tqstyle().tqpixelMetric(TQStyle::PM_ScrollBarSliderMin)), "*");
stream << parse_rc_string("GtkScrollbar::slider-width = " + TQString::number(tqApp->tqstyle().tqpixelMetric(TQStyle::PM_ScrollBarExtent)-2), "*");
stream << parse_rc_string("GtkScrollbar::min-slider-length = " + TQString::number(tqApp->style().pixelMetric(TQStyle::PM_ScrollBarSliderMin)), "*");
stream << parse_rc_string("GtkScrollbar::slider-width = " + TQString::number(tqApp->style().pixelMetric(TQStyle::PM_ScrollBarExtent)-2), "*");
stream << parse_rc_string("GtkButton::child-displacement-x = " + TQString::number(tqApp->tqstyle().tqpixelMetric(TQStyle::PM_ButtonShiftHorizontal)), "*");
stream << parse_rc_string("GtkButton::child-displacement-y = " + TQString::number(tqApp->tqstyle().tqpixelMetric(TQStyle::PM_ButtonShiftVertical)), "*");
stream << parse_rc_string("GtkButton::child-displacement-x = " + TQString::number(tqApp->style().pixelMetric(TQStyle::PM_ButtonShiftHorizontal)), "*");
stream << parse_rc_string("GtkButton::child-displacement-y = " + TQString::number(tqApp->style().pixelMetric(TQStyle::PM_ButtonShiftVertical)), "*");
stream << parse_rc_string("GtkButton::default-border = { 0, 0, 0, 0 }", "*");
stream << parse_rc_string("GtkButton::default-outside-border = {0, 0, 0, 0}", "*");
#ifdef USE_NATIVE_GTK_BUTTON_DRAWING
@ -2107,10 +2109,10 @@ void setRcProperties(GtkRcStyle* rc_style, int forceRecreate)
stream << parse_rc_string("GtkButtonBox::child_internal_pad_y = 0", "*");
TQSlider slider(NULL); // To keep BlueCurve happy
stream << parse_rc_string("GtkScale::slider-length = " + TQString::number(tqApp->tqstyle().tqpixelMetric(TQStyle::PM_SliderLength, &slider)), "*");
stream << parse_rc_string("GtkScale::slider-length = " + TQString::number(tqApp->style().pixelMetric(TQStyle::PM_SliderLength, &slider)), "*");
stream << parse_rc_string("xthickness = " + TQString::number(tqApp->tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth)), "*.GtkMenu");
stream << parse_rc_string("ythickness = " + TQString::number(tqApp->tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth)), "*.GtkMenu");
stream << parse_rc_string("xthickness = " + TQString::number(tqApp->style().pixelMetric(TQStyle::PM_DefaultFrameWidth)), "*.GtkMenu");
stream << parse_rc_string("ythickness = " + TQString::number(tqApp->style().pixelMetric(TQStyle::PM_DefaultFrameWidth)), "*.GtkMenu");
stream << parse_rc_string("xthickness = 5", "*.GtkMenu.Gtk*MenuItem");
stream << parse_rc_string("xthickness = 3", "*.GtkNotebook");
stream << parse_rc_string("ythickness = 3", "*.GtkNotebook");
@ -2134,7 +2136,7 @@ void setRcProperties(GtkRcStyle* rc_style, int forceRecreate)
stream << parse_rc_string("GtkNotebook::tab-overlap = 1", "*");
// This one may not work...
//insertIntProperty(rc_style, "GtkCheckButton", "indicator-size", tqApp->tqstyle().tqpixelMetric(TQStyle::PM_IndicatorHeight) );
//insertIntProperty(rc_style, "GtkCheckButton", "indicator-size", tqApp->style().pixelMetric(TQStyle::PM_IndicatorHeight) );
// For icons
@ -2293,7 +2295,7 @@ void setMenuBackground(GtkStyle* style)
TQMenuData md;
TQMenuItem* mi = md.findItem(md.insertItem(""));
tqApp->tqstyle().polish(&pm);
tqApp->style().polish(&pm);
TQStyleOption opt(mi, 16, 16);
TQStyle::SFlags sflags = TQStyle::Style_Default;
@ -2301,8 +2303,8 @@ void setMenuBackground(GtkStyle* style)
if ((backgroundTile) && (!backgroundTile->isNull()))
painter.fillRect(0, 0, 1024, 25, TQBrush(TQColor(255,255,255), *backgroundTile));
else
painter.fillRect(0, 0, 1024, 25, tqApp->tqpalette().active().brush(TQColorGroup::Background));
tqApp->tqstyle().tqdrawControl(TQStyle::CE_PopupMenuItem, &painter, &pm, TQRect(0,0,1024,25), tqApp->tqpalette().active(), sflags, opt);
painter.fillRect(0, 0, 1024, 25, tqApp->palette().active().brush(TQColorGroup::Background));
tqApp->style().drawControl(TQStyle::CE_PopupMenuItem, &painter, &pm, TQRect(0,0,1024,25), tqApp->palette().active(), sflags, opt);
menuBackgroundPixmapGdk = gdk_pixmap_foreign_new(menuBackgroundPixmap->handle());
}
@ -2346,9 +2348,9 @@ void getTextColor(GdkColor *color, GtkStateType state_type)
return;
if ((state_type == GTK_STATE_PRELIGHT) || (state_type == GTK_STATE_ACTIVE) || (state_type == GTK_STATE_SELECTED))
setColour(color, tqApp->tqpalette().active().highlightedText());
setColour(color, tqApp->palette().active().highlightedText());
else if (state_type == GTK_STATE_NORMAL)
setColour(color, tqApp->tqpalette().active().text());
setColour(color, tqApp->palette().active().text());
else if (state_type == GTK_STATE_INSENSITIVE)
setColour(color, tqApp->tqpalette().disabled().text());
setColour(color, tqApp->palette().disabled().text());
}

@ -3,7 +3,7 @@
#include <gtk/gtkprogressbar.h>
#include <gdk/gdk.h>
#include <gtk/gtk.h>
#include <glib/glist.h>
#include <glib.h>
#ifdef HAVE_BONOBO
#include <libbonobo.h>
@ -41,7 +41,7 @@ static GtkStyleClass *parent_class = NULL;
static PangoLayout*
get_insensitive_layout (GdkDrawable *drawable,
PangoLayout *tqlayout);
PangoLayout *layout);
static GtkShadowType
@ -578,7 +578,7 @@ draw_arrow(GtkStyle* style,
ay = y;
aw = width;
ah = height;
calculate_arrow_tqgeometry (arrow_type, &ax, &ay, &aw, &ah);
calculate_arrow_geometry (arrow_type, &ax, &ay, &aw, &ah);
half_width = width / 2;
half_height = height / 2;
@ -844,7 +844,7 @@ draw_box(GtkStyle * style,
/* THIS IS WHAT WORKS NOW --
Tabs and tabbarbase will be drawn properly according to the QT style
But the tabs won't be aligned according to QT. GTK+ does not have
an option for tqalignment of tabs. So if were to do this not only do we have to
an option for alignment of tabs. So if were to do this not only do we have to
calculate the x,y position of the tab ourselves, which is difficult in Qt unless
we are displaying the tab (can be done by subclassing TQTabBar/TQTabWidget)
but also have to position the tab bar label ourselves in gtk.
@ -1351,7 +1351,7 @@ void draw_layout (GtkStyle *style,
const gchar *detail,
gint x,
gint y,
PangoLayout *tqlayout)
PangoLayout *layout)
{
gboolean paint_layout = TRUE;
@ -1395,7 +1395,7 @@ void draw_layout (GtkStyle *style,
const gchar *text;
gint text_length = 0;
gint text_bytelen = 0;
text = pango_layout_get_text (tqlayout);
text = pango_layout_get_text (layout);
if (text != 0)
{
PangoAttribute *textcolorattr;
@ -1406,19 +1406,19 @@ void draw_layout (GtkStyle *style,
textcolorattr->start_index = 0;
textcolorattr->end_index = text_bytelen;
layoutattr = pango_layout_get_attributes(tqlayout);
layoutattr = pango_layout_get_attributes(layout);
if (layoutattr == NULL)
{
layoutattr = pango_attr_list_new();
pango_attr_list_insert(layoutattr, pango_attribute_copy(textcolorattr));
pango_layout_set_attributes(tqlayout,layoutattr);
pango_layout_set_attributes(layout,layoutattr);
pango_attr_list_unref(layoutattr);
}
else
{
pango_attr_list_change(layoutattr, pango_attribute_copy(textcolorattr));
pango_layout_set_attributes(tqlayout,layoutattr);
pango_layout_set_attributes(layout,layoutattr);
}
pango_attribute_destroy(textcolorattr);
}
@ -1437,13 +1437,13 @@ void draw_layout (GtkStyle *style,
if (state_type == GTK_STATE_INSENSITIVE)
{
PangoLayout *ins;
ins = get_insensitive_layout (window, tqlayout);
ins = get_insensitive_layout (window, layout);
gdk_draw_layout (window, gc, x, y, ins);
g_object_unref (ins);
}
else
{
gdk_draw_layout (window, gc, x, y, tqlayout);
gdk_draw_layout (window, gc, x, y, layout);
}
if (area)
@ -1472,7 +1472,7 @@ range_new (guint start,
static PangoLayout*
get_insensitive_layout (GdkDrawable *drawable,
PangoLayout *tqlayout)
PangoLayout *layout)
{
GSList *embossed_ranges = NULL;
GSList *stippled_ranges = NULL;
@ -1482,7 +1482,7 @@ get_insensitive_layout (GdkDrawable *drawable,
PangoAttrList *attrs;
GdkBitmap *stipple = NULL;
iter = pango_layout_get_iter (tqlayout);
iter = pango_layout_get_iter (layout);
do
{
@ -1529,7 +1529,7 @@ get_insensitive_layout (GdkDrawable *drawable,
pango_layout_iter_free (iter);
new_layout = pango_layout_copy (tqlayout);
new_layout = pango_layout_copy (layout);
attrs = pango_layout_get_attributes (new_layout);

Loading…
Cancel
Save