|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
/*
|
|
|
|
|
TQtCurve (C) Craig Drummond, 2003 - 2010 craig.p.drummond@gmail.com
|
|
|
|
|
QtCurve (C) Craig Drummond, 2003 - 2010 craig.p.drummond@gmail.com
|
|
|
|
|
|
|
|
|
|
----
|
|
|
|
|
|
|
|
|
@ -125,6 +125,10 @@ dimension, so as to draw the scrollbar at the correct size.
|
|
|
|
|
#include <X11/Xatom.h>
|
|
|
|
|
#include "qtc_fixx11h.h"
|
|
|
|
|
|
|
|
|
|
#ifndef HAVE_REAL_TQT
|
|
|
|
|
#define TQTitleBar QTitleBar
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
static const Atom constNetMoveResize = XInternAtom(qt_xdisplay(), "_NET_WM_MOVERESIZE", False);
|
|
|
|
|
static const TQWidget * getTopLevel(const TQWidget *widget)
|
|
|
|
|
{
|
|
|
|
@ -338,16 +342,16 @@ static TQString themeFile(const TQString &dir, const TQString &n, bool trinity=t
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
class TQtCurveStylePlugin : public TQStylePlugin
|
|
|
|
|
class QtCurveStylePlugin : public TQStylePlugin
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
TQtCurveStylePlugin() : TQStylePlugin() { }
|
|
|
|
|
QtCurveStylePlugin() : TQStylePlugin() { }
|
|
|
|
|
|
|
|
|
|
TQStringList keys() const
|
|
|
|
|
{
|
|
|
|
|
TQStringList list;
|
|
|
|
|
list << "TQtCurve";
|
|
|
|
|
list << "QtCurve";
|
|
|
|
|
|
|
|
|
|
#ifdef TQTC_STYLE_SUPPORT
|
|
|
|
|
getStyles(kdeHome(useTQt3Settings()), list);
|
|
|
|
@ -362,16 +366,16 @@ class TQtCurveStylePlugin : public TQStylePlugin
|
|
|
|
|
TQStyle * create(const TQString &s)
|
|
|
|
|
{
|
|
|
|
|
return "qtcurve"==s.lower()
|
|
|
|
|
? new TQtCurveStyle
|
|
|
|
|
? new QtCurveStyle
|
|
|
|
|
#ifdef TQTC_STYLE_SUPPORT
|
|
|
|
|
: 0==s.find(THEME_PREFIX)
|
|
|
|
|
? new TQtCurveStyle(s)
|
|
|
|
|
? new QtCurveStyle(s)
|
|
|
|
|
#endif
|
|
|
|
|
: 0;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
TQ_EXPORT_PLUGIN(TQtCurveStylePlugin)
|
|
|
|
|
TQ_EXPORT_PLUGIN(QtCurveStylePlugin)
|
|
|
|
|
|
|
|
|
|
#define SKIP_TASKBAR (APP_SKIP_TASKBAR==itsThemedApp || APP_KPRINTER==itsThemedApp || APP_KDIALOG==itsThemedApp)
|
|
|
|
|
|
|
|
|
@ -803,9 +807,9 @@ static void drawArrow(TQPainter *p, const TQRect &r, const TQColor &col, TQStyle
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#ifdef TQTC_STYLE_SUPPORT
|
|
|
|
|
TQtCurveStyle::TQtCurveStyle(const TQString &name)
|
|
|
|
|
QtCurveStyle::QtCurveStyle(const TQString &name)
|
|
|
|
|
#else
|
|
|
|
|
TQtCurveStyle::TQtCurveStyle()
|
|
|
|
|
QtCurveStyle::QtCurveStyle()
|
|
|
|
|
#endif
|
|
|
|
|
: BASE_STYLE(AllowMenuTransparency, WindowsStyleScrollBar),
|
|
|
|
|
itsSliderCols(0L),
|
|
|
|
@ -1108,7 +1112,7 @@ TQtCurveStyle::TQtCurveStyle()
|
|
|
|
|
setSbType();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TQtCurveStyle::~TQtCurveStyle()
|
|
|
|
|
QtCurveStyle::~QtCurveStyle()
|
|
|
|
|
{
|
|
|
|
|
if(itsSidebarButtonsCols!=itsSliderCols &&
|
|
|
|
|
itsSidebarButtonsCols!=itsDefBtnCols)
|
|
|
|
@ -1151,12 +1155,12 @@ static TQString getFile(const TQString &f)
|
|
|
|
|
return d;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::polish(TQApplication *app)
|
|
|
|
|
void QtCurveStyle::polish(TQApplication *app)
|
|
|
|
|
{
|
|
|
|
|
TQString appName(getFile(app->argv()[0]));
|
|
|
|
|
|
|
|
|
|
if(NULL!=getenv("QTCURVE_DEBUG"))
|
|
|
|
|
std::cout << "TQtCurve: Application name: \"" << appName.latin1() << "\"\n";
|
|
|
|
|
std::cout << "QtCurve: Application name: \"" << appName.latin1() << "\"\n";
|
|
|
|
|
|
|
|
|
|
if ("kicker"==appName || "appletproxy"==appName)
|
|
|
|
|
{
|
|
|
|
@ -1242,7 +1246,7 @@ void TQtCurveStyle::polish(TQApplication *app)
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::polish(TQPalette &pal)
|
|
|
|
|
void QtCurveStyle::polish(TQPalette &pal)
|
|
|
|
|
{
|
|
|
|
|
if(APP_MACTOR==itsThemedApp && itsMactorPal &&
|
|
|
|
|
pal.active().background()!=itsMactorPal->active().background())
|
|
|
|
@ -1414,7 +1418,7 @@ static TQColor disable(const TQColor &col, const TQColor &bgnd)
|
|
|
|
|
return c;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TQColorGroup TQtCurveStyle::setColorGroup(const TQColorGroup &old, const TQColorGroup &act, bool dis)
|
|
|
|
|
TQColorGroup QtCurveStyle::setColorGroup(const TQColorGroup &old, const TQColorGroup &act, bool dis)
|
|
|
|
|
{
|
|
|
|
|
TQColor mid(old.mid());
|
|
|
|
|
|
|
|
|
@ -1445,7 +1449,7 @@ TQColorGroup TQtCurveStyle::setColorGroup(const TQColorGroup &old, const TQColor
|
|
|
|
|
|
|
|
|
|
static const char * kdeToolbarWidget="kde toolbar widget";
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::polish(TQWidget *widget)
|
|
|
|
|
void QtCurveStyle::polish(TQWidget *widget)
|
|
|
|
|
{
|
|
|
|
|
bool enableFilter(opts.highlightFactor || opts.coloredMouseOver);
|
|
|
|
|
|
|
|
|
@ -1823,7 +1827,7 @@ void TQtCurveStyle::polish(TQWidget *widget)
|
|
|
|
|
BASE_STYLE::polish(widget);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::unPolish(TQWidget *widget)
|
|
|
|
|
void QtCurveStyle::unPolish(TQWidget *widget)
|
|
|
|
|
{
|
|
|
|
|
if(isFormWidget(widget))
|
|
|
|
|
itsKhtmlWidgets.remove(widget);
|
|
|
|
@ -1962,7 +1966,7 @@ static void sendXEvent(TQDialog *dlg, const char *msg)
|
|
|
|
|
SubstructureRedirectMask | SubstructureNotifyMask, &xev);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool TQtCurveStyle::appIsNotEmbedded(TQDialog *dlg)
|
|
|
|
|
bool QtCurveStyle::appIsNotEmbedded(TQDialog *dlg)
|
|
|
|
|
{
|
|
|
|
|
Window win;
|
|
|
|
|
|
|
|
|
@ -1974,7 +1978,7 @@ bool TQtCurveStyle::appIsNotEmbedded(TQDialog *dlg)
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event)
|
|
|
|
|
bool QtCurveStyle::eventFilter(TQObject *object, TQEvent *event)
|
|
|
|
|
{
|
|
|
|
|
if(itsHoverWidget && TQT_BASE_OBJECT(object)==TQT_BASE_OBJECT(itsHoverWidget) && (TQEvent::Destroy==event->type() || TQEvent::Hide==event->type()))
|
|
|
|
|
resetHover();
|
|
|
|
@ -2430,7 +2434,7 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event)
|
|
|
|
|
return BASE_STYLE::eventFilter(object, event);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::drawLightBevel(const TQColor &bgnd, TQPainter *p, const TQRect &rOrig,
|
|
|
|
|
void QtCurveStyle::drawLightBevel(const TQColor &bgnd, TQPainter *p, const TQRect &rOrig,
|
|
|
|
|
const TQColorGroup &cg, SFlags flags,
|
|
|
|
|
int round, const TQColor &fill, const TQColor *custom,
|
|
|
|
|
bool doBorder, bool doCorners, EWidget w) const
|
|
|
|
@ -2651,7 +2655,7 @@ void TQtCurveStyle::drawLightBevel(const TQColor &bgnd, TQPainter *p, const TQRe
|
|
|
|
|
p->restore();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::drawGlow(TQPainter *p, const TQRect &r, const TQColorGroup &cg, EWidget w, const TQColor *cols) const
|
|
|
|
|
void QtCurveStyle::drawGlow(TQPainter *p, const TQRect &r, const TQColorGroup &cg, EWidget w, const TQColor *cols) const
|
|
|
|
|
{
|
|
|
|
|
if(itsMouseOverCols || itsDefBtnCols || cols)
|
|
|
|
|
{
|
|
|
|
@ -2686,7 +2690,7 @@ void TQtCurveStyle::drawGlow(TQPainter *p, const TQRect &r, const TQColorGroup &
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::drawEtch(TQPainter *p, const TQRect &r, const TQColorGroup &cg, bool raised, bool square) const
|
|
|
|
|
void QtCurveStyle::drawEtch(TQPainter *p, const TQRect &r, const TQColorGroup &cg, bool raised, bool square) const
|
|
|
|
|
{
|
|
|
|
|
square=square || ROUND_NONE==opts.round;
|
|
|
|
|
|
|
|
|
@ -2723,7 +2727,7 @@ void TQtCurveStyle::drawEtch(TQPainter *p, const TQRect &r, const TQColorGroup &
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::drawBorder(const TQColor &bgnd, TQPainter *p, const TQRect &r, const TQColorGroup &cg,
|
|
|
|
|
void QtCurveStyle::drawBorder(const TQColor &bgnd, TQPainter *p, const TQRect &r, const TQColorGroup &cg,
|
|
|
|
|
SFlags flags, int round, const TQColor *custom, EWidget w, bool doCorners,
|
|
|
|
|
EBorder borderProfile, bool blendBorderColors, int borderVal) const
|
|
|
|
|
{
|
|
|
|
@ -2973,7 +2977,7 @@ void TQtCurveStyle::drawBorder(const TQColor &bgnd, TQPainter *p, const TQRect &
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::drawMdiIcon(TQPainter *painter, const TQColor &color, const TQColor &shadow, const TQRect &r, bool sunken, int margin,
|
|
|
|
|
void QtCurveStyle::drawMdiIcon(TQPainter *painter, const TQColor &color, const TQColor &shadow, const TQRect &r, bool sunken, int margin,
|
|
|
|
|
SubControl button) const
|
|
|
|
|
{
|
|
|
|
|
if(!sunken)
|
|
|
|
@ -2981,7 +2985,7 @@ void TQtCurveStyle::drawMdiIcon(TQPainter *painter, const TQColor &color, const
|
|
|
|
|
drawWindowIcon(painter, color, r, sunken, margin, button);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::drawWindowIcon(TQPainter *painter, const TQColor &color, const TQRect &r, bool sunken, int margin, SubControl button) const
|
|
|
|
|
void QtCurveStyle::drawWindowIcon(TQPainter *painter, const TQColor &color, const TQRect &r, bool sunken, int margin, SubControl button) const
|
|
|
|
|
{
|
|
|
|
|
TQRect rect(r);
|
|
|
|
|
|
|
|
|
@ -3064,7 +3068,7 @@ void TQtCurveStyle::drawWindowIcon(TQPainter *painter, const TQColor &color, con
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::drawEntryField(TQPainter *p, const TQRect &rx, const TQColorGroup &cg,
|
|
|
|
|
void QtCurveStyle::drawEntryField(TQPainter *p, const TQRect &rx, const TQColorGroup &cg,
|
|
|
|
|
SFlags flags, EntryColor coloration, int round, EWidget w) const
|
|
|
|
|
{
|
|
|
|
|
const TQColor *use(ENTRY_MOUSE_OVER==coloration && itsMouseOverCols
|
|
|
|
@ -3123,7 +3127,7 @@ void TQtCurveStyle::drawEntryField(TQPainter *p, const TQRect &rx, const TQColor
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::drawArrow(TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags,
|
|
|
|
|
void QtCurveStyle::drawArrow(TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags,
|
|
|
|
|
TQ_PrimitiveElement pe, bool small, bool checkActive) const
|
|
|
|
|
{
|
|
|
|
|
const TQColor &col(flags&Style_Enabled
|
|
|
|
@ -3135,7 +3139,7 @@ void TQtCurveStyle::drawArrow(TQPainter *p, const TQRect &r, const TQColorGroup
|
|
|
|
|
::drawArrow(p, r, p->pen().style()==TQPen::NoPen ? col : TQColor(p->pen().color()), pe, opts, small);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const TQRect &r,
|
|
|
|
|
void QtCurveStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const TQRect &r,
|
|
|
|
|
const TQColorGroup &cg, SFlags flags, const TQStyleOption &data) const
|
|
|
|
|
{
|
|
|
|
|
switch(pe)
|
|
|
|
@ -4078,7 +4082,7 @@ void TQtCurveStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const
|
|
|
|
|
widget->parentWidget() && ::tqqt_cast<TQListBox *>(widget->parentWidget()) &&
|
|
|
|
|
widget->parentWidget()->parentWidget() && ::tqqt_cast<TQComboBox *>(widget->parentWidget()->parentWidget()))
|
|
|
|
|
{
|
|
|
|
|
struct TQtCurveListBoxItem : public TQListBoxItem
|
|
|
|
|
struct QtCurveListBoxItem : public TQListBoxItem
|
|
|
|
|
{
|
|
|
|
|
void paintContents(TQPainter *p)
|
|
|
|
|
{
|
|
|
|
@ -4087,7 +4091,7 @@ void TQtCurveStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
TQListBox *box=(TQListBox *)widget->parentWidget();
|
|
|
|
|
TQtCurveListBoxItem *item=(TQtCurveListBoxItem *)(box->item(box->currentItem()));
|
|
|
|
|
QtCurveListBoxItem *item=(QtCurveListBoxItem *)(box->item(box->currentItem()));
|
|
|
|
|
|
|
|
|
|
if(item)
|
|
|
|
|
{
|
|
|
|
@ -4306,7 +4310,7 @@ static TQString elliditide(const TQString &text, const TQFontMetrics &fontMetric
|
|
|
|
|
return title;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::drawKStylePrimitive(KStylePrimitive kpe, TQPainter *p, const TQWidget *widget,
|
|
|
|
|
void QtCurveStyle::drawKStylePrimitive(KStylePrimitive kpe, TQPainter *p, const TQWidget *widget,
|
|
|
|
|
const TQRect &r, const TQColorGroup &cg, SFlags flags,
|
|
|
|
|
const TQStyleOption &opt) const
|
|
|
|
|
{
|
|
|
|
@ -4460,7 +4464,7 @@ void TQtCurveStyle::drawKStylePrimitive(KStylePrimitive kpe, TQPainter *p, const
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQWidget *widget,
|
|
|
|
|
void QtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQWidget *widget,
|
|
|
|
|
const TQRect &r, const TQColorGroup &cg, SFlags flags,
|
|
|
|
|
const TQStyleOption &data) const
|
|
|
|
|
{
|
|
|
|
@ -5379,7 +5383,7 @@ void TQtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQWi
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::drawControlMask(ControlElement control, TQPainter *p, const TQWidget *widget,
|
|
|
|
|
void QtCurveStyle::drawControlMask(ControlElement control, TQPainter *p, const TQWidget *widget,
|
|
|
|
|
const TQRect &r, const TQStyleOption &data) const
|
|
|
|
|
{
|
|
|
|
|
switch(control)
|
|
|
|
@ -5405,7 +5409,7 @@ void TQtCurveStyle::drawControlMask(ControlElement control, TQPainter *p, const
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::drawComplexControlMask(ComplexControl control, TQPainter *p, const TQWidget *widget,
|
|
|
|
|
void QtCurveStyle::drawComplexControlMask(ComplexControl control, TQPainter *p, const TQWidget *widget,
|
|
|
|
|
const TQRect &r, const TQStyleOption &data) const
|
|
|
|
|
{
|
|
|
|
|
switch (control)
|
|
|
|
@ -5420,7 +5424,7 @@ void TQtCurveStyle::drawComplexControlMask(ComplexControl control, TQPainter *p,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TQRect TQtCurveStyle::subRect(SubRect subrect, const TQWidget *widget)const
|
|
|
|
|
TQRect QtCurveStyle::subRect(SubRect subrect, const TQWidget *widget)const
|
|
|
|
|
{
|
|
|
|
|
TQRect rect,
|
|
|
|
|
wrect(widget->rect());
|
|
|
|
@ -5477,7 +5481,7 @@ class TQTitleBar : public TQWidget
|
|
|
|
|
TQWidget *window() const;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, const TQWidget *widget,
|
|
|
|
|
void QtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, const TQWidget *widget,
|
|
|
|
|
const TQRect &r, const TQColorGroup &cg, SFlags flags,
|
|
|
|
|
SCFlags controls, SCFlags active,
|
|
|
|
|
const TQStyleOption &data) const
|
|
|
|
@ -6266,7 +6270,7 @@ void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, con
|
|
|
|
|
case CC_Slider:
|
|
|
|
|
//
|
|
|
|
|
// Note: Can't use KStyle's drawing routine, as this doesnt work for sliders on gradient
|
|
|
|
|
// toolbars. It also draws groove, focus, slider - wherease TQtCurve needs groove,
|
|
|
|
|
// toolbars. It also draws groove, focus, slider - wherease QtCurve needs groove,
|
|
|
|
|
// slider, focus. We also ony double-buffer if not on a toolbar, as we dont know
|
|
|
|
|
// the background, etc, if on a toolbar - and that is handled in eventFilter
|
|
|
|
|
{
|
|
|
|
@ -6442,7 +6446,7 @@ void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, con
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TQRect TQtCurveStyle::querySubControlMetrics(TQ_ComplexControl control, const TQWidget *widget,
|
|
|
|
|
TQRect QtCurveStyle::querySubControlMetrics(TQ_ComplexControl control, const TQWidget *widget,
|
|
|
|
|
SubControl sc, const TQStyleOption &data) const
|
|
|
|
|
{
|
|
|
|
|
bool reverse(TQApplication::reverseLayout());
|
|
|
|
@ -6737,7 +6741,7 @@ TQRect TQtCurveStyle::querySubControlMetrics(TQ_ComplexControl control, const TQ
|
|
|
|
|
return BASE_STYLE::querySubControlMetrics(control, widget, sc, data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int TQtCurveStyle::pixelMetric(PixelMetric metric, const TQWidget *widget) const
|
|
|
|
|
int QtCurveStyle::pixelMetric(PixelMetric metric, const TQWidget *widget) const
|
|
|
|
|
{
|
|
|
|
|
switch(metric)
|
|
|
|
|
{
|
|
|
|
@ -6827,7 +6831,7 @@ int TQtCurveStyle::pixelMetric(PixelMetric metric, const TQWidget *widget) const
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int TQtCurveStyle::kPixelMetric(KStylePixelMetric kpm, const TQWidget *widget) const
|
|
|
|
|
int QtCurveStyle::kPixelMetric(KStylePixelMetric kpm, const TQWidget *widget) const
|
|
|
|
|
{
|
|
|
|
|
switch(kpm)
|
|
|
|
|
{
|
|
|
|
@ -6838,7 +6842,7 @@ int TQtCurveStyle::kPixelMetric(KStylePixelMetric kpm, const TQWidget *widget) c
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TQSize TQtCurveStyle::tqsizeFromContents(ContentsType contents, const TQWidget *widget,
|
|
|
|
|
TQSize QtCurveStyle::tqsizeFromContents(ContentsType contents, const TQWidget *widget,
|
|
|
|
|
const TQSize &contentsSize, const TQStyleOption &data) const
|
|
|
|
|
{
|
|
|
|
|
switch(contents)
|
|
|
|
@ -6950,7 +6954,7 @@ TQSize TQtCurveStyle::tqsizeFromContents(ContentsType contents, const TQWidget *
|
|
|
|
|
return BASE_STYLE::tqsizeFromContents(contents, widget, contentsSize, data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int TQtCurveStyle::styleHint(StyleHint stylehint, const TQWidget *widget, const TQStyleOption &option,
|
|
|
|
|
int QtCurveStyle::styleHint(StyleHint stylehint, const TQWidget *widget, const TQStyleOption &option,
|
|
|
|
|
TQStyleHintReturn *returnData) const
|
|
|
|
|
{
|
|
|
|
|
switch(stylehint)
|
|
|
|
@ -6997,7 +7001,7 @@ int TQtCurveStyle::styleHint(StyleHint stylehint, const TQWidget *widget, const
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::drawItem(TQPainter *p, const TQRect &r, int flags, const TQColorGroup &cg, bool enabled,
|
|
|
|
|
void QtCurveStyle::drawItem(TQPainter *p, const TQRect &r, int flags, const TQColorGroup &cg, bool enabled,
|
|
|
|
|
const TQPixmap *pixmap, const TQString &text, int len, const TQColor *penColor) const
|
|
|
|
|
{
|
|
|
|
|
TQRect r2(r);
|
|
|
|
@ -7111,7 +7115,7 @@ void TQtCurveStyle::drawItem(TQPainter *p, const TQRect &r, int flags, const TQC
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::drawMenuItem(TQPainter *p, const TQRect &r, int flags, const TQColorGroup &cg,
|
|
|
|
|
void QtCurveStyle::drawMenuItem(TQPainter *p, const TQRect &r, int flags, const TQColorGroup &cg,
|
|
|
|
|
bool mbi, int round, const TQColor &bgnd, const TQColor *cols) const
|
|
|
|
|
{
|
|
|
|
|
int fill=opts.useHighlightForMenu && (!mbi || itsHighlightCols==cols) ? ORIGINAL_SHADE : 4,
|
|
|
|
@ -7168,7 +7172,7 @@ void TQtCurveStyle::drawMenuItem(TQPainter *p, const TQRect &r, int flags, const
|
|
|
|
|
drawBevelGradient(cols[fill], p, r, true, false, opts.menuitemAppearance, WIDGET_MENU_ITEM);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::drawProgress(TQPainter *p, const TQRect &rx, const TQColorGroup &cg, SFlags flags,
|
|
|
|
|
void QtCurveStyle::drawProgress(TQPainter *p, const TQRect &rx, const TQColorGroup &cg, SFlags flags,
|
|
|
|
|
int round, const TQWidget *widget) const
|
|
|
|
|
{
|
|
|
|
|
if(rx.width()<1)
|
|
|
|
@ -7262,7 +7266,7 @@ void TQtCurveStyle::drawProgress(TQPainter *p, const TQRect &rx, const TQColorGr
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::drawBevelGradient(const TQColor &base, TQPainter *p, const TQRect &origRect, bool horiz, bool sel, EAppearance bevApp, EWidget w) const
|
|
|
|
|
void QtCurveStyle::drawBevelGradient(const TQColor &base, TQPainter *p, const TQRect &origRect, bool horiz, bool sel, EAppearance bevApp, EWidget w) const
|
|
|
|
|
{
|
|
|
|
|
if(IS_FLAT(bevApp) && opts.colorSelTab && sel)
|
|
|
|
|
bevApp=APPEARANCE_GRADIENT;
|
|
|
|
@ -7310,7 +7314,7 @@ void TQtCurveStyle::drawBevelGradient(const TQColor &base, TQPainter *p, const T
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::drawBevelGradientReal(const TQColor &base, TQPainter *p, const TQRect &r, bool horiz, bool sel, EAppearance app, EWidget w) const
|
|
|
|
|
void QtCurveStyle::drawBevelGradientReal(const TQColor &base, TQPainter *p, const TQRect &r, bool horiz, bool sel, EAppearance app, EWidget w) const
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
const Gradient *grad=getGradient(app, &opts);
|
|
|
|
@ -7379,7 +7383,7 @@ void TQtCurveStyle::drawBevelGradientReal(const TQColor &base, TQPainter *p, con
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::drawGradient(const TQColor &top, const TQColor &bot,
|
|
|
|
|
void QtCurveStyle::drawGradient(const TQColor &top, const TQColor &bot,
|
|
|
|
|
TQPainter *p, TQRect const &r, bool horiz) const
|
|
|
|
|
{
|
|
|
|
|
if(r.width()>0 && r.height()>0)
|
|
|
|
@ -7428,7 +7432,7 @@ void TQtCurveStyle::drawGradient(const TQColor &top, const TQColor &bot,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::drawSbSliderHandle(TQPainter *p, const TQRect &orig, const TQColorGroup &cg,
|
|
|
|
|
void QtCurveStyle::drawSbSliderHandle(TQPainter *p, const TQRect &orig, const TQColorGroup &cg,
|
|
|
|
|
SFlags flags, bool slider) const
|
|
|
|
|
{
|
|
|
|
|
int min(MIN_SLIDER_SIZE(opts.sliderThumbs));
|
|
|
|
@ -7483,7 +7487,7 @@ void TQtCurveStyle::drawSbSliderHandle(TQPainter *p, const TQRect &orig, const T
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::drawSliderHandle(TQPainter *p, const TQRect &r, const TQColorGroup &cg,
|
|
|
|
|
void QtCurveStyle::drawSliderHandle(TQPainter *p, const TQRect &r, const TQColorGroup &cg,
|
|
|
|
|
SFlags flags, TQSlider *slider, bool tb) const
|
|
|
|
|
{
|
|
|
|
|
bool horiz(SLIDER_TRIANGULAR==opts.sliderStyle ? r.height()>r.width() : r.width()>r.height());
|
|
|
|
@ -7668,7 +7672,7 @@ void TQtCurveStyle::drawSliderHandle(TQPainter *p, const TQRect &r, const TQColo
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::drawSliderGroove(TQPainter *p, const TQRect &r, const TQColorGroup &cg,
|
|
|
|
|
void QtCurveStyle::drawSliderGroove(TQPainter *p, const TQRect &r, const TQColorGroup &cg,
|
|
|
|
|
SFlags flags, const TQWidget *widget) const
|
|
|
|
|
{
|
|
|
|
|
const TQSlider *sliderWidget((const TQSlider *)widget);
|
|
|
|
@ -7730,7 +7734,7 @@ void TQtCurveStyle::drawSliderGroove(TQPainter *p, const TQRect &r, const TQColo
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::drawMenuOrToolBarBackground(TQPainter *p, const TQRect &r, const TQColorGroup &cg,
|
|
|
|
|
void QtCurveStyle::drawMenuOrToolBarBackground(TQPainter *p, const TQRect &r, const TQColorGroup &cg,
|
|
|
|
|
bool menu, bool horiz) const
|
|
|
|
|
{
|
|
|
|
|
if(menu && APPEARANCE_STRIPED==opts.bgndAppearance && IS_FLAT(opts.menubarAppearance) && SHADE_NONE==opts.shadeMenubars)
|
|
|
|
@ -7746,7 +7750,7 @@ void TQtCurveStyle::drawMenuOrToolBarBackground(TQPainter *p, const TQRect &r, c
|
|
|
|
|
drawBevelGradient(color, p, rx, horiz, false, app);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::drawHandleMarkers(TQPainter *p, const TQRect &r, SFlags flags, bool tb,
|
|
|
|
|
void QtCurveStyle::drawHandleMarkers(TQPainter *p, const TQRect &r, SFlags flags, bool tb,
|
|
|
|
|
ELine handles) const
|
|
|
|
|
{
|
|
|
|
|
if(r.width()<2 || r.height()<2)
|
|
|
|
@ -7798,7 +7802,7 @@ void TQtCurveStyle::drawHandleMarkers(TQPainter *p, const TQRect &r, SFlags flag
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::drawHighlight(TQPainter *p, const TQRect &r, const TQColorGroup &cg, bool horiz, bool inc) const
|
|
|
|
|
void QtCurveStyle::drawHighlight(TQPainter *p, const TQRect &r, const TQColorGroup &cg, bool horiz, bool inc) const
|
|
|
|
|
{
|
|
|
|
|
TQColor col1(midColor(cg.background(), itsMouseOverCols[ORIGINAL_SHADE]));
|
|
|
|
|
TQRect r2(r);
|
|
|
|
@ -7810,7 +7814,7 @@ void TQtCurveStyle::drawHighlight(TQPainter *p, const TQRect &r, const TQColorGr
|
|
|
|
|
p->drawLine(r2.x(), r2.y(), r2.x()+(horiz ? r2.width()-1 : 0), r2.y()+(horiz ? 0 : r2.height()-1));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::shadeColors(const TQColor &base, TQColor *vals) const
|
|
|
|
|
void QtCurveStyle::shadeColors(const TQColor &base, TQColor *vals) const
|
|
|
|
|
{
|
|
|
|
|
SHADES
|
|
|
|
|
|
|
|
|
@ -7826,7 +7830,7 @@ void TQtCurveStyle::shadeColors(const TQColor &base, TQColor *vals) const
|
|
|
|
|
vals[ORIGINAL_SHADE]=base;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const TQColor * TQtCurveStyle::buttonColors(const TQColorGroup &cg) const
|
|
|
|
|
const TQColor * QtCurveStyle::buttonColors(const TQColorGroup &cg) const
|
|
|
|
|
{
|
|
|
|
|
if(cg.button()!=itsButtonCols[ORIGINAL_SHADE])
|
|
|
|
|
{
|
|
|
|
@ -7837,14 +7841,14 @@ const TQColor * TQtCurveStyle::buttonColors(const TQColorGroup &cg) const
|
|
|
|
|
return itsButtonCols;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const TQColor * TQtCurveStyle::checkRadioColors(const TQColorGroup &cg, SFlags flags) const
|
|
|
|
|
const TQColor * QtCurveStyle::checkRadioColors(const TQColorGroup &cg, SFlags flags) const
|
|
|
|
|
{
|
|
|
|
|
return opts.crColor && flags&Style_Enabled && (flags&Style_On || !(flags&Style_Off))
|
|
|
|
|
? itsCheckRadioSelCols
|
|
|
|
|
: buttonColors(cg);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const TQColor * TQtCurveStyle::sliderColors(/*const TQColorGroup &cg, */ SFlags flags) const
|
|
|
|
|
const TQColor * QtCurveStyle::sliderColors(/*const TQColorGroup &cg, */ SFlags flags) const
|
|
|
|
|
{
|
|
|
|
|
return (flags&Style_Enabled)
|
|
|
|
|
? SHADE_NONE!=opts.shadeSliders &&itsSliderCols && (!opts.colorSliderMouseOver || flags&Style_MouseOver)
|
|
|
|
@ -7853,7 +7857,7 @@ const TQColor * TQtCurveStyle::sliderColors(/*const TQColorGroup &cg, */ SFlags
|
|
|
|
|
: itsBackgroundCols;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const TQColor * TQtCurveStyle::backgroundColors(const TQColor &c) const
|
|
|
|
|
const TQColor * QtCurveStyle::backgroundColors(const TQColor &c) const
|
|
|
|
|
{
|
|
|
|
|
if(c!=itsBackgroundCols[ORIGINAL_SHADE])
|
|
|
|
|
{
|
|
|
|
@ -7864,13 +7868,13 @@ const TQColor * TQtCurveStyle::backgroundColors(const TQColor &c) const
|
|
|
|
|
return itsBackgroundCols;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const TQColor * TQtCurveStyle::borderColors(SFlags flags, const TQColor *use) const
|
|
|
|
|
const TQColor * QtCurveStyle::borderColors(SFlags flags, const TQColor *use) const
|
|
|
|
|
{
|
|
|
|
|
return itsMouseOverCols && opts.coloredMouseOver && flags&Style_MouseOver
|
|
|
|
|
? itsMouseOverCols : use;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const TQColor * TQtCurveStyle::getSidebarButtons() const
|
|
|
|
|
const TQColor * QtCurveStyle::getSidebarButtons() const
|
|
|
|
|
{
|
|
|
|
|
if(!itsSidebarButtonsCols)
|
|
|
|
|
{
|
|
|
|
@ -7889,7 +7893,7 @@ const TQColor * TQtCurveStyle::getSidebarButtons() const
|
|
|
|
|
return itsSidebarButtonsCols;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::setMenuColors(const TQColorGroup &cg)
|
|
|
|
|
void QtCurveStyle::setMenuColors(const TQColorGroup &cg)
|
|
|
|
|
{
|
|
|
|
|
switch(opts.shadeMenubars)
|
|
|
|
|
{
|
|
|
|
@ -7916,7 +7920,7 @@ void TQtCurveStyle::setMenuColors(const TQColorGroup &cg)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const TQColor * TQtCurveStyle::menuColors(const TQColorGroup &cg, bool active) const
|
|
|
|
|
const TQColor * QtCurveStyle::menuColors(const TQColorGroup &cg, bool active) const
|
|
|
|
|
{
|
|
|
|
|
return SHADE_WINDOW_BORDER==opts.shadeMenubars
|
|
|
|
|
? getMdiColors(cg, active)
|
|
|
|
@ -7925,7 +7929,7 @@ const TQColor * TQtCurveStyle::menuColors(const TQColorGroup &cg, bool active) c
|
|
|
|
|
: itsMenubarCols;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::setDecorationColors(bool init)
|
|
|
|
|
void QtCurveStyle::setDecorationColors(bool init)
|
|
|
|
|
{
|
|
|
|
|
if(!readKdeGlobals() && !init)
|
|
|
|
|
return;
|
|
|
|
@ -7939,7 +7943,7 @@ void TQtCurveStyle::setDecorationColors(bool init)
|
|
|
|
|
shadeColors(kdeSettings.focus, itsFocusCols);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const TQColor * TQtCurveStyle::getMdiColors(const TQColorGroup &cg, bool active) const
|
|
|
|
|
const TQColor * QtCurveStyle::getMdiColors(const TQColorGroup &cg, bool active) const
|
|
|
|
|
{
|
|
|
|
|
if(!itsActiveMdiColors)
|
|
|
|
|
{
|
|
|
|
@ -8064,7 +8068,7 @@ const TQColor * TQtCurveStyle::getMdiColors(const TQColorGroup &cg, bool active)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#ifdef SET_MDI_WINDOW_BUTTON_POSITIONS
|
|
|
|
|
void TQtCurveStyle::readMdiPositions() const
|
|
|
|
|
void QtCurveStyle::readMdiPositions() const
|
|
|
|
|
{
|
|
|
|
|
if(0==itsMdiButtons[0].size() && 0==itsMdiButtons[1].size())
|
|
|
|
|
{
|
|
|
|
@ -8137,7 +8141,7 @@ void TQtCurveStyle::readMdiPositions() const
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
bool TQtCurveStyle::redrawHoverWidget(const TQPoint &pos)
|
|
|
|
|
bool QtCurveStyle::redrawHoverWidget(const TQPoint &pos)
|
|
|
|
|
{
|
|
|
|
|
if(!itsHoverWidget || !itsHoverWidget->isShown() || !itsHoverWidget->isVisible())
|
|
|
|
|
return false;
|
|
|
|
@ -8357,7 +8361,7 @@ bool TQtCurveStyle::redrawHoverWidget(const TQPoint &pos)
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const TQColor & TQtCurveStyle::getFill(SFlags flags, const TQColor *use, bool cr, bool darker) const
|
|
|
|
|
const TQColor & QtCurveStyle::getFill(SFlags flags, const TQColor *use, bool cr, bool darker) const
|
|
|
|
|
{
|
|
|
|
|
return !(flags&Style_Enabled)
|
|
|
|
|
? use[darker ? 2 : ORIGINAL_SHADE]
|
|
|
|
@ -8372,7 +8376,7 @@ const TQColor & TQtCurveStyle::getFill(SFlags flags, const TQColor *use, bool cr
|
|
|
|
|
: use[darker ? 2 : ORIGINAL_SHADE];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const TQColor & TQtCurveStyle::getTabFill(bool current, bool highlight, const TQColor *use) const
|
|
|
|
|
const TQColor & QtCurveStyle::getTabFill(bool current, bool highlight, const TQColor *use) const
|
|
|
|
|
{
|
|
|
|
|
return current
|
|
|
|
|
? use[ORIGINAL_SHADE]
|
|
|
|
@ -8381,7 +8385,7 @@ const TQColor & TQtCurveStyle::getTabFill(bool current, bool highlight, const TQ
|
|
|
|
|
: use[2];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const TQColor & TQtCurveStyle::menuStripeCol() const
|
|
|
|
|
const TQColor & QtCurveStyle::menuStripeCol() const
|
|
|
|
|
{
|
|
|
|
|
switch(opts.menuStripe)
|
|
|
|
|
{
|
|
|
|
@ -8407,7 +8411,7 @@ const TQColor & TQtCurveStyle::menuStripeCol() const
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const TQColor & TQtCurveStyle::checkRadioCol(SFlags flags, const TQColorGroup &cg) const
|
|
|
|
|
const TQColor & QtCurveStyle::checkRadioCol(SFlags flags, const TQColorGroup &cg) const
|
|
|
|
|
{
|
|
|
|
|
if(flags&MENU_ITEM)
|
|
|
|
|
return flags&Style_Enabled && flags&Style_Active && opts.useHighlightForMenu
|
|
|
|
@ -8421,7 +8425,7 @@ const TQColor & TQtCurveStyle::checkRadioCol(SFlags flags, const TQColorGroup &c
|
|
|
|
|
: cg.text();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TQColor TQtCurveStyle::shade(const TQColor &a, float k) const
|
|
|
|
|
TQColor QtCurveStyle::shade(const TQColor &a, float k) const
|
|
|
|
|
{
|
|
|
|
|
TQColor mod;
|
|
|
|
|
|
|
|
|
@ -8429,12 +8433,12 @@ TQColor TQtCurveStyle::shade(const TQColor &a, float k) const
|
|
|
|
|
return mod;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::shade(const color &ca, color *cb, double k) const
|
|
|
|
|
void QtCurveStyle::shade(const color &ca, color *cb, double k) const
|
|
|
|
|
{
|
|
|
|
|
::shade(&opts, ca, cb, k);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TQPixmap * TQtCurveStyle::getPixelPixmap(const TQColor col) const
|
|
|
|
|
TQPixmap * QtCurveStyle::getPixelPixmap(const TQColor col) const
|
|
|
|
|
{
|
|
|
|
|
TQRgb rgb(col.rgb());
|
|
|
|
|
TQString key(createKey(rgb));
|
|
|
|
@ -8456,7 +8460,7 @@ TQPixmap * TQtCurveStyle::getPixelPixmap(const TQColor col) const
|
|
|
|
|
return pix;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TQPixmap * TQtCurveStyle::createStripePixmap(const TQColor &col, bool forWindow) const
|
|
|
|
|
TQPixmap * QtCurveStyle::createStripePixmap(const TQColor &col, bool forWindow) const
|
|
|
|
|
{
|
|
|
|
|
TQRgb rgb(col.rgb());
|
|
|
|
|
TQString key(createKey(rgb, forWindow ? 'S' : 's'));
|
|
|
|
@ -8512,13 +8516,13 @@ static void recolour(TQImage &img, const TQColor &col, double shade)
|
|
|
|
|
adjustPix(img.bits(), 4, img.width(), img.height(), img.bytesPerLine(), col.red(), col.green(), col.blue(), shade);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::drawDot(TQPainter *p, const TQRect &r, const TQColor *cols) const
|
|
|
|
|
void QtCurveStyle::drawDot(TQPainter *p, const TQRect &r, const TQColor *cols) const
|
|
|
|
|
{
|
|
|
|
|
TQPixmap *pix=getPixmap(cols[STD_BORDER], PIX_DOT, 0.9);
|
|
|
|
|
p->drawPixmap(r.x()+((r.width()-pix->width())>>1), r.y()+((r.height()-pix->height())>>1), *pix);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TQPixmap * TQtCurveStyle::getPixmap(const TQColor col, EPixmap p, double shade) const
|
|
|
|
|
TQPixmap * QtCurveStyle::getPixmap(const TQColor col, EPixmap p, double shade) const
|
|
|
|
|
{
|
|
|
|
|
TQRgb rgb(col.rgb());
|
|
|
|
|
TQString key(createKey(rgb, p));
|
|
|
|
@ -8579,7 +8583,7 @@ TQPixmap * TQtCurveStyle::getPixmap(const TQColor col, EPixmap p, double shade)
|
|
|
|
|
return pix;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::setSbType()
|
|
|
|
|
void QtCurveStyle::setSbType()
|
|
|
|
|
{
|
|
|
|
|
switch(opts.scrollbarType)
|
|
|
|
|
{
|
|
|
|
@ -8599,7 +8603,7 @@ void TQtCurveStyle::setSbType()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::resetHover()
|
|
|
|
|
void QtCurveStyle::resetHover()
|
|
|
|
|
{
|
|
|
|
|
itsIsSpecialHover=false;
|
|
|
|
|
itsOldPos.setX(-1);
|
|
|
|
@ -8618,7 +8622,7 @@ struct TQtcMenuBar : public TQMenuBar
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
bool TQtCurveStyle::isWindowDragWidget(TQObject *o, const TQPoint &pos)
|
|
|
|
|
bool QtCurveStyle::isWindowDragWidget(TQObject *o, const TQPoint &pos)
|
|
|
|
|
{
|
|
|
|
|
return opts.windowDrag &&
|
|
|
|
|
(//qobject_cast<TQDialog*>(o) ||
|
|
|
|
@ -8636,7 +8640,7 @@ bool TQtCurveStyle::isWindowDragWidget(TQObject *o, const TQPoint &pos)
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::updateProgressPos()
|
|
|
|
|
void QtCurveStyle::updateProgressPos()
|
|
|
|
|
{
|
|
|
|
|
// Taken from lipstik!
|
|
|
|
|
TQMap<TQWidget*, int>::iterator it(itsProgAnimWidgets.begin()),
|
|
|
|
@ -8663,12 +8667,12 @@ void TQtCurveStyle::updateProgressPos()
|
|
|
|
|
itsAnimationTimer->stop();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::progressBarDestroyed(TQObject *bar)
|
|
|
|
|
void QtCurveStyle::progressBarDestroyed(TQObject *bar)
|
|
|
|
|
{
|
|
|
|
|
itsProgAnimWidgets.remove(TQT_TQWIDGET(bar));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::sliderThumbMoved(int)
|
|
|
|
|
void QtCurveStyle::sliderThumbMoved(int)
|
|
|
|
|
{
|
|
|
|
|
TQSlider *slider(::tqqt_cast<TQSlider*>(sender()));
|
|
|
|
|
|
|
|
|
@ -8676,12 +8680,12 @@ void TQtCurveStyle::sliderThumbMoved(int)
|
|
|
|
|
slider->update();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::khtmlWidgetDestroyed(TQObject *o)
|
|
|
|
|
void QtCurveStyle::khtmlWidgetDestroyed(TQObject *o)
|
|
|
|
|
{
|
|
|
|
|
itsKhtmlWidgets.remove(TQT_TQWIDGET_CONST(o));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TQtCurveStyle::hoverWidgetDestroyed(TQObject *o)
|
|
|
|
|
void QtCurveStyle::hoverWidgetDestroyed(TQObject *o)
|
|
|
|
|
{
|
|
|
|
|
if(TQT_BASE_OBJECT(o)==TQT_BASE_OBJECT(itsHoverWidget))
|
|
|
|
|
resetHover();
|
|
|
|
|