|
|
@ -710,9 +710,9 @@ void drawButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int defa
|
|
|
|
button.setOn(sflags&TQStyle::Style_On);
|
|
|
|
button.setOn(sflags&TQStyle::Style_On);
|
|
|
|
|
|
|
|
|
|
|
|
// This emulates ::drawButton() in the Qt qbutton.cpp file
|
|
|
|
// This emulates ::drawButton() in the Qt qbutton.cpp file
|
|
|
|
tqApp->tqstyle().tqdrawControl(TQStyle::CE_PushButton, &painter, &button,
|
|
|
|
tqApp->tqstyle().drawControl(TQStyle::CE_PushButton, &painter, &button,
|
|
|
|
TQRect(0,0,w,h), button.tqpalette().active(), sflags);
|
|
|
|
TQRect(0,0,w,h), button.tqpalette().active(), sflags);
|
|
|
|
tqApp->tqstyle().tqdrawControl(TQStyle::CE_PushButtonLabel, &painter, &button,
|
|
|
|
tqApp->tqstyle().drawControl(TQStyle::CE_PushButtonLabel, &painter, &button,
|
|
|
|
tqApp->tqstyle().subRect(TQStyle::SR_PushButtonContents, &button),
|
|
|
|
tqApp->tqstyle().subRect(TQStyle::SR_PushButtonContents, &button),
|
|
|
|
button.colorGroup(), sflags);
|
|
|
|
button.colorGroup(), sflags);
|
|
|
|
|
|
|
|
|
|
|
@ -739,7 +739,7 @@ void drawButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int defa
|
|
|
|
|
|
|
|
|
|
|
|
painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().background());
|
|
|
|
painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().background());
|
|
|
|
|
|
|
|
|
|
|
|
tqApp->tqstyle().tqdrawControl(TQStyle::CE_PushButton, &painter, &button,
|
|
|
|
tqApp->tqstyle().drawControl(TQStyle::CE_PushButton, &painter, &button,
|
|
|
|
TQRect(0,0,w,h), button.tqpalette().active(), sflags);
|
|
|
|
TQRect(0,0,w,h), button.tqpalette().active(), sflags);
|
|
|
|
|
|
|
|
|
|
|
|
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
|
|
|
|
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
|
|
|
@ -875,7 +875,7 @@ void drawTab(GdkWindow* window, GtkStyle* style, GtkStateType state, int x, int
|
|
|
|
sflags = TQStyle::Style_Selected;
|
|
|
|
sflags = TQStyle::Style_Selected;
|
|
|
|
|
|
|
|
|
|
|
|
painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().brush(TQColorGroup::Background));
|
|
|
|
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));
|
|
|
|
tqApp->tqstyle().drawControl(TQStyle::CE_TabBarTab, &painter, meepTabBar, TQRect(0,0,w,h), tqApp->tqpalette().active(), sflags, TQStyleOption(tab));
|
|
|
|
|
|
|
|
|
|
|
|
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
|
|
|
|
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
|
|
|
|
gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h);
|
|
|
|
gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h);
|
|
|
@ -1007,7 +1007,7 @@ void drawComboBox(GdkWindow* window, GtkStyle* style, GtkStateType state, int x,
|
|
|
|
activeflags = TQStyle::Style_MouseOver;
|
|
|
|
activeflags = TQStyle::Style_MouseOver;
|
|
|
|
|
|
|
|
|
|
|
|
painter.fillRect(0,0, w, h, tqApp->tqpalette().active().brush(TQColorGroup::Background));
|
|
|
|
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);
|
|
|
|
tqApp->tqstyle().drawComplexControl(TQStyle::CC_ComboBox, &painter, &cb, TQRect(0, 0, w, h), tqApp->tqpalette().active(), sflags, scflags, activeflags);
|
|
|
|
|
|
|
|
|
|
|
|
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
|
|
|
|
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
|
|
|
|
gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h);
|
|
|
|
gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h);
|
|
|
@ -1019,8 +1019,8 @@ void drawCheckBox(GdkWindow* window, GtkStyle* style, GtkStateType state, int ch
|
|
|
|
if (!gtkQtEnable)
|
|
|
|
if (!gtkQtEnable)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
int realH = tqApp->tqstyle().tqpixelMetric(TQStyle::PM_IndicatorHeight);
|
|
|
|
int realH = tqApp->tqstyle().pixelMetric(TQStyle::PM_IndicatorHeight);
|
|
|
|
int realW = tqApp->tqstyle().tqpixelMetric(TQStyle::PM_IndicatorWidth);
|
|
|
|
int realW = tqApp->tqstyle().pixelMetric(TQStyle::PM_IndicatorWidth);
|
|
|
|
|
|
|
|
|
|
|
|
if ((realW < 1) || (realH < 1))
|
|
|
|
if ((realW < 1) || (realH < 1))
|
|
|
|
return;
|
|
|
|
return;
|
|
|
@ -1033,7 +1033,7 @@ void drawCheckBox(GdkWindow* window, GtkStyle* style, GtkStateType state, int ch
|
|
|
|
sflags |= (checked ? TQStyle::Style_On : TQStyle::Style_Off);
|
|
|
|
sflags |= (checked ? TQStyle::Style_On : TQStyle::Style_Off);
|
|
|
|
|
|
|
|
|
|
|
|
painter.fillRect(0, 0, realW, realH, tqApp->tqpalette().active().brush(TQColorGroup::Background));
|
|
|
|
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);
|
|
|
|
tqApp->tqstyle().drawControl(TQStyle::CE_CheckBox, &painter, &checkbox, TQRect(0, 0, realW, realH), tqApp->tqpalette().active(), sflags);
|
|
|
|
|
|
|
|
|
|
|
|
// Qt checkboxes are usually bigger than GTK wants.
|
|
|
|
// Qt checkboxes are usually bigger than GTK wants.
|
|
|
|
// We cheat, and draw them over the expected area.
|
|
|
|
// We cheat, and draw them over the expected area.
|
|
|
@ -1055,8 +1055,8 @@ void drawMenuCheck(GdkWindow* window, GtkStyle* style, GtkStateType state, int x
|
|
|
|
/* A previous version of the function followed the sizehints exclusively
|
|
|
|
/* 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 */
|
|
|
|
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 w1 = checkbox.sizeHint().width();
|
|
|
|
int h1 = checkbox.tqsizeHint().height(); */
|
|
|
|
int h1 = checkbox.sizeHint().height(); */
|
|
|
|
|
|
|
|
|
|
|
|
if ((w < 1) || (h < 1))
|
|
|
|
if ((w < 1) || (h < 1))
|
|
|
|
return;
|
|
|
|
return;
|
|
|
@ -1085,8 +1085,8 @@ void drawRadioButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int
|
|
|
|
if (!gtkQtEnable)
|
|
|
|
if (!gtkQtEnable)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
int realH = tqApp->tqstyle().tqpixelMetric(TQStyle::PM_IndicatorHeight);
|
|
|
|
int realH = tqApp->tqstyle().pixelMetric(TQStyle::PM_IndicatorHeight);
|
|
|
|
int realW = tqApp->tqstyle().tqpixelMetric(TQStyle::PM_IndicatorWidth);
|
|
|
|
int realW = tqApp->tqstyle().pixelMetric(TQStyle::PM_IndicatorWidth);
|
|
|
|
|
|
|
|
|
|
|
|
if ((realW < 1) || (realH < 1))
|
|
|
|
if ((realW < 1) || (realH < 1))
|
|
|
|
return;
|
|
|
|
return;
|
|
|
@ -1105,7 +1105,7 @@ void drawRadioButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int
|
|
|
|
else
|
|
|
|
else
|
|
|
|
painter.fillRect(0, 0, realW, realH, tqApp->tqpalette().active().brush(TQColorGroup::Background));
|
|
|
|
painter.fillRect(0, 0, realW, realH, tqApp->tqpalette().active().brush(TQColorGroup::Background));
|
|
|
|
|
|
|
|
|
|
|
|
tqApp->tqstyle().tqdrawControl(TQStyle::CE_RadioButton, &painter, &radio, TQRect(0,0,realH,realW), tqApp->tqpalette().active(), sflags);
|
|
|
|
tqApp->tqstyle().drawControl(TQStyle::CE_RadioButton, &painter, &radio, TQRect(0,0,realH,realW), tqApp->tqpalette().active(), sflags);
|
|
|
|
|
|
|
|
|
|
|
|
// Qt checkboxes are usually bigger than GTK wants.
|
|
|
|
// Qt checkboxes are usually bigger than GTK wants.
|
|
|
|
// We cheat, and draw them over the expected area.
|
|
|
|
// We cheat, and draw them over the expected area.
|
|
|
@ -1259,7 +1259,7 @@ void drawScrollBar(GdkWindow* window, GtkStyle* style, GtkStateType state, int o
|
|
|
|
|
|
|
|
|
|
|
|
painter2.fillRect(0, 0, w, h + thumbSize,
|
|
|
|
painter2.fillRect(0, 0, w, h + thumbSize,
|
|
|
|
tqApp->tqpalette().active().brush(TQColorGroup::Background));
|
|
|
|
tqApp->tqpalette().active().brush(TQColorGroup::Background));
|
|
|
|
tqApp->tqstyle().tqdrawComplexControl(TQStyle::CC_ScrollBar,
|
|
|
|
tqApp->tqstyle().drawComplexControl(TQStyle::CC_ScrollBar,
|
|
|
|
&painter2, scrollBar, TQRect(0, 0, w, h+thumbSize),
|
|
|
|
&painter2, scrollBar, TQRect(0, 0, w, h+thumbSize),
|
|
|
|
tqApp->tqpalette().active(), sflags);
|
|
|
|
tqApp->tqpalette().active(), sflags);
|
|
|
|
|
|
|
|
|
|
|
@ -1284,7 +1284,7 @@ void drawScrollBar(GdkWindow* window, GtkStyle* style, GtkStateType state, int o
|
|
|
|
|
|
|
|
|
|
|
|
painter2.fillRect(0, 0, w + thumbSize, h,
|
|
|
|
painter2.fillRect(0, 0, w + thumbSize, h,
|
|
|
|
tqApp->tqpalette().active().brush(TQColorGroup::Background));
|
|
|
|
tqApp->tqpalette().active().brush(TQColorGroup::Background));
|
|
|
|
tqApp->tqstyle().tqdrawComplexControl(TQStyle::CC_ScrollBar,
|
|
|
|
tqApp->tqstyle().drawComplexControl(TQStyle::CC_ScrollBar,
|
|
|
|
&painter2, scrollBar, TQRect(0, 0, w+thumbSize, h),
|
|
|
|
&painter2, scrollBar, TQRect(0, 0, w+thumbSize, h),
|
|
|
|
tqApp->tqpalette().active(), sflags);
|
|
|
|
tqApp->tqpalette().active(), sflags);
|
|
|
|
|
|
|
|
|
|
|
@ -1310,8 +1310,8 @@ void drawToolButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int
|
|
|
|
button.resize(w, h);
|
|
|
|
button.resize(w, h);
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
int realW = button.tqsizeHint().width();
|
|
|
|
int realW = button.sizeHint().width();
|
|
|
|
int realH = button.tqsizeHint().height(); */
|
|
|
|
int realH = button.sizeHint().height(); */
|
|
|
|
|
|
|
|
|
|
|
|
TQStyle::SFlags sflags = stateToSFlags(state);
|
|
|
|
TQStyle::SFlags sflags = stateToSFlags(state);
|
|
|
|
TQStyle::SCFlags activeflags = TQStyle::SC_None;
|
|
|
|
TQStyle::SCFlags activeflags = TQStyle::SC_None;
|
|
|
@ -1330,7 +1330,7 @@ void drawToolButton(GdkWindow* window, GtkStyle* style, GtkStateType state, int
|
|
|
|
painter.fillRect(0, 0, w, h, TQBrush(TQColor(255,255,255), *backgroundTile));
|
|
|
|
painter.fillRect(0, 0, w, h, TQBrush(TQColor(255,255,255), *backgroundTile));
|
|
|
|
else
|
|
|
|
else
|
|
|
|
painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().brush(TQColorGroup::Background));
|
|
|
|
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);
|
|
|
|
tqApp->tqstyle().drawComplexControl(TQStyle::CC_ToolButton, &painter, &button, TQRect(0, 0, w, h), tqApp->tqpalette().active(), sflags, TQStyle::SC_ToolButton, activeflags);
|
|
|
|
|
|
|
|
|
|
|
|
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
|
|
|
|
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
|
|
|
|
gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h);
|
|
|
|
gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h);
|
|
|
@ -1352,7 +1352,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;
|
|
|
|
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->tqstyle().drawControl(TQStyle::CE_MenuBarItem, &painter, &mb, TQRect(0, 0, w, h), tqApp->tqpalette().active(), sflags, TQStyleOption(&mi));
|
|
|
|
|
|
|
|
|
|
|
|
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
|
|
|
|
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
|
|
|
|
gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h);
|
|
|
|
gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h);
|
|
|
@ -1377,7 +1377,7 @@ void drawMenuItem(GdkWindow* window, GtkStyle* style, GtkStateType state, int x,
|
|
|
|
TQStyle::SFlags sflags = TQStyle::Style_Active | TQStyle::Style_Enabled;
|
|
|
|
TQStyle::SFlags sflags = TQStyle::Style_Active | TQStyle::Style_Enabled;
|
|
|
|
|
|
|
|
|
|
|
|
painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().brush(TQColorGroup::Background));
|
|
|
|
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);
|
|
|
|
tqApp->tqstyle().drawControl(TQStyle::CE_PopupMenuItem, &painter, &pm, TQRect(0,0,w,h), tqApp->tqpalette().active(), sflags, opt);
|
|
|
|
|
|
|
|
|
|
|
|
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
|
|
|
|
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
|
|
|
|
gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h);
|
|
|
|
gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h);
|
|
|
@ -1432,7 +1432,7 @@ void drawTabFrame(GdkWindow* window, GtkStyle* style, GtkStateType state, int x,
|
|
|
|
g_object_unref(pix);
|
|
|
|
g_object_unref(pix);
|
|
|
|
|
|
|
|
|
|
|
|
// Drawing tab base
|
|
|
|
// Drawing tab base
|
|
|
|
int th = tqApp->tqstyle().tqpixelMetric(TQStyle::PM_TabBarBaseHeight, meepTabBar);
|
|
|
|
int th = tqApp->tqstyle().pixelMetric(TQStyle::PM_TabBarBaseHeight, meepTabBar);
|
|
|
|
int tw = w;
|
|
|
|
int tw = w;
|
|
|
|
|
|
|
|
|
|
|
|
if ((tw < 1) || (th < 1))
|
|
|
|
if ((tw < 1) || (th < 1))
|
|
|
@ -1454,13 +1454,13 @@ void drawTabFrame(GdkWindow* window, GtkStyle* style, GtkStateType state, int x,
|
|
|
|
pixmap1 = pixmap1.xForm(m);
|
|
|
|
pixmap1 = pixmap1.xForm(m);
|
|
|
|
|
|
|
|
|
|
|
|
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap1.handle());
|
|
|
|
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->tqstyle().pixelMetric(TQStyle::PM_TabBarBaseOverlap, meepTabBar), tw, th);
|
|
|
|
g_object_unref(pix);
|
|
|
|
g_object_unref(pix);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap1.handle());
|
|
|
|
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->tqstyle().pixelMetric(TQStyle::PM_TabBarBaseOverlap, meepTabBar), tw, th);
|
|
|
|
g_object_unref(pix);
|
|
|
|
g_object_unref(pix);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1532,7 +1532,7 @@ void drawProgressChunk(GdkWindow * window, GtkStyle * style, GtkStateType state,
|
|
|
|
|
|
|
|
|
|
|
|
painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().brush(TQColorGroup::Background));
|
|
|
|
painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().brush(TQColorGroup::Background));
|
|
|
|
|
|
|
|
|
|
|
|
tqApp->tqstyle().tqdrawControl(TQStyle::CE_ProgressBarContents, &painter, &bar, TQRect(0,0,w2,h2), tqApp->tqpalette().active(), sflags);
|
|
|
|
tqApp->tqstyle().drawControl(TQStyle::CE_ProgressBarContents, &painter, &bar, TQRect(0,0,w2,h2), tqApp->tqpalette().active(), sflags);
|
|
|
|
|
|
|
|
|
|
|
|
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
|
|
|
|
GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
|
|
|
|
if (isAlloy)
|
|
|
|
if (isAlloy)
|
|
|
@ -1685,7 +1685,7 @@ void drawSquareButton(GdkWindow* window, GtkStyle* style, GtkStateType state, in
|
|
|
|
else
|
|
|
|
else
|
|
|
|
painter.fillRect(0, 0, 20, 20, tqApp->tqpalette().active().brush(TQColorGroup::Background));
|
|
|
|
painter.fillRect(0, 0, 20, 20, tqApp->tqpalette().active().brush(TQColorGroup::Background));
|
|
|
|
|
|
|
|
|
|
|
|
tqApp->tqstyle().tqdrawControl(TQStyle::CE_PushButton, &painter, &button,
|
|
|
|
tqApp->tqstyle().drawControl(TQStyle::CE_PushButton, &painter, &button,
|
|
|
|
TQRect(0,0,20,20), tqApp->tqpalette().active(), sflags);
|
|
|
|
TQRect(0,0,20,20), tqApp->tqpalette().active(), sflags);
|
|
|
|
|
|
|
|
|
|
|
|
TQImage image = pixmap.convertToImage().smoothScale(w,h);
|
|
|
|
TQImage image = pixmap.convertToImage().smoothScale(w,h);
|
|
|
@ -1762,7 +1762,7 @@ void drawTabNG(GdkWindow *window, GtkStyle* style, GtkStateType state, int x, in
|
|
|
|
else
|
|
|
|
else
|
|
|
|
|
|
|
|
|
|
|
|
painter.fillRect(0, 0, w, h, tqApp->tqpalette().active().brush(TQColorGroup::Background));
|
|
|
|
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));
|
|
|
|
tqApp->tqstyle().drawControl(TQStyle::CE_TabBarTab, &painter, (TQTabBar *)meepTabBar, TQRect(0,0,w,h), tqApp->tqpalette().active(), sflags, TQStyleOption(tab));
|
|
|
|
|
|
|
|
|
|
|
|
painter.end(); // So the pixmap assignment below won't give an error
|
|
|
|
painter.end(); // So the pixmap assignment below won't give an error
|
|
|
|
// Account for tab position -- if its in the bottom flip the image
|
|
|
|
// Account for tab position -- if its in the bottom flip the image
|
|
|
@ -2084,11 +2084,11 @@ void setRcProperties(GtkRcStyle* rc_style, int forceRecreate)
|
|
|
|
|
|
|
|
|
|
|
|
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->tqstyle().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::min-slider-length = " + TQString::number(tqApp->tqstyle().pixelMetric(TQStyle::PM_ScrollBarSliderMin)), "*");
|
|
|
|
stream << parse_rc_string("GtkScrollbar::slider-width = " + TQString::number(tqApp->tqstyle().tqpixelMetric(TQStyle::PM_ScrollBarExtent)-2), "*");
|
|
|
|
stream << parse_rc_string("GtkScrollbar::slider-width = " + TQString::number(tqApp->tqstyle().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-x = " + TQString::number(tqApp->tqstyle().pixelMetric(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-y = " + TQString::number(tqApp->tqstyle().pixelMetric(TQStyle::PM_ButtonShiftVertical)), "*");
|
|
|
|
stream << parse_rc_string("GtkButton::default-border = { 0, 0, 0, 0 }", "*");
|
|
|
|
stream << parse_rc_string("GtkButton::default-border = { 0, 0, 0, 0 }", "*");
|
|
|
|
stream << parse_rc_string("GtkButton::default-outside-border = {0, 0, 0, 0}", "*");
|
|
|
|
stream << parse_rc_string("GtkButton::default-outside-border = {0, 0, 0, 0}", "*");
|
|
|
|
#ifdef USE_NATIVE_GTK_BUTTON_DRAWING
|
|
|
|
#ifdef USE_NATIVE_GTK_BUTTON_DRAWING
|
|
|
@ -2107,10 +2107,10 @@ void setRcProperties(GtkRcStyle* rc_style, int forceRecreate)
|
|
|
|
stream << parse_rc_string("GtkButtonBox::child_internal_pad_y = 0", "*");
|
|
|
|
stream << parse_rc_string("GtkButtonBox::child_internal_pad_y = 0", "*");
|
|
|
|
|
|
|
|
|
|
|
|
TQSlider slider(NULL); // To keep BlueCurve happy
|
|
|
|
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->tqstyle().pixelMetric(TQStyle::PM_SliderLength, &slider)), "*");
|
|
|
|
|
|
|
|
|
|
|
|
stream << parse_rc_string("xthickness = " + TQString::number(tqApp->tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth)), "*.GtkMenu");
|
|
|
|
stream << parse_rc_string("xthickness = " + TQString::number(tqApp->tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth)), "*.GtkMenu");
|
|
|
|
stream << parse_rc_string("ythickness = " + TQString::number(tqApp->tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth)), "*.GtkMenu");
|
|
|
|
stream << parse_rc_string("ythickness = " + TQString::number(tqApp->tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth)), "*.GtkMenu");
|
|
|
|
stream << parse_rc_string("xthickness = 5", "*.GtkMenu.Gtk*MenuItem");
|
|
|
|
stream << parse_rc_string("xthickness = 5", "*.GtkMenu.Gtk*MenuItem");
|
|
|
|
stream << parse_rc_string("xthickness = 3", "*.GtkNotebook");
|
|
|
|
stream << parse_rc_string("xthickness = 3", "*.GtkNotebook");
|
|
|
|
stream << parse_rc_string("ythickness = 3", "*.GtkNotebook");
|
|
|
|
stream << parse_rc_string("ythickness = 3", "*.GtkNotebook");
|
|
|
@ -2134,7 +2134,7 @@ void setRcProperties(GtkRcStyle* rc_style, int forceRecreate)
|
|
|
|
stream << parse_rc_string("GtkNotebook::tab-overlap = 1", "*");
|
|
|
|
stream << parse_rc_string("GtkNotebook::tab-overlap = 1", "*");
|
|
|
|
|
|
|
|
|
|
|
|
// This one may not work...
|
|
|
|
// This one may not work...
|
|
|
|
//insertIntProperty(rc_style, "GtkCheckButton", "indicator-size", tqApp->tqstyle().tqpixelMetric(TQStyle::PM_IndicatorHeight) );
|
|
|
|
//insertIntProperty(rc_style, "GtkCheckButton", "indicator-size", tqApp->tqstyle().pixelMetric(TQStyle::PM_IndicatorHeight) );
|
|
|
|
|
|
|
|
|
|
|
|
// For icons
|
|
|
|
// For icons
|
|
|
|
|
|
|
|
|
|
|
@ -2302,7 +2302,7 @@ void setMenuBackground(GtkStyle* style)
|
|
|
|
painter.fillRect(0, 0, 1024, 25, TQBrush(TQColor(255,255,255), *backgroundTile));
|
|
|
|
painter.fillRect(0, 0, 1024, 25, TQBrush(TQColor(255,255,255), *backgroundTile));
|
|
|
|
else
|
|
|
|
else
|
|
|
|
painter.fillRect(0, 0, 1024, 25, tqApp->tqpalette().active().brush(TQColorGroup::Background));
|
|
|
|
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);
|
|
|
|
tqApp->tqstyle().drawControl(TQStyle::CE_PopupMenuItem, &painter, &pm, TQRect(0,0,1024,25), tqApp->tqpalette().active(), sflags, opt);
|
|
|
|
|
|
|
|
|
|
|
|
menuBackgroundPixmapGdk = gdk_pixmap_foreign_new(menuBackgroundPixmap->handle());
|
|
|
|
menuBackgroundPixmapGdk = gdk_pixmap_foreign_new(menuBackgroundPixmap->handle());
|
|
|
|
}
|
|
|
|
}
|
|
|
|