|
|
@ -74,7 +74,7 @@ DEALINGS IN THE SOFTWARE.
|
|
|
|
#include "klearlook.h"
|
|
|
|
#include "klearlook.h"
|
|
|
|
#include <tqsettings.h>
|
|
|
|
#include <tqsettings.h>
|
|
|
|
|
|
|
|
|
|
|
|
#if KDE_VERSION >= 0x30200
|
|
|
|
#if TDE_VERSION >= 0x30200
|
|
|
|
#include <tqfile.h>
|
|
|
|
#include <tqfile.h>
|
|
|
|
#include <tqdir.h>
|
|
|
|
#include <tqdir.h>
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
@ -102,7 +102,7 @@ static const int itemFrame = 2;
|
|
|
|
static const int arrowHMargin = 6;
|
|
|
|
static const int arrowHMargin = 6;
|
|
|
|
static const int rightBorder = 12;
|
|
|
|
static const int rightBorder = 12;
|
|
|
|
|
|
|
|
|
|
|
|
#if KDE_VERSION >= 0x30200
|
|
|
|
#if TDE_VERSION >= 0x30200
|
|
|
|
// Try to read $KDEHOME/share/config/kickerrc to find out if kicker is transparent...
|
|
|
|
// Try to read $KDEHOME/share/config/kickerrc to find out if kicker is transparent...
|
|
|
|
|
|
|
|
|
|
|
|
static TQString readEnvPath( const char *env ) {
|
|
|
|
static TQString readEnvPath( const char *env ) {
|
|
|
@ -445,7 +445,7 @@ borderButton( bb ), borderFrame( bf ), rounded( round ), etchedSlider( etched ),
|
|
|
|
pmProfile( PROFILE_SUNKEN ), vArrow( va ), boldDefText( bdt ), crLabelHighlight( crlh ), lvDark( lvd ),
|
|
|
|
pmProfile( PROFILE_SUNKEN ), vArrow( va ), boldDefText( bdt ), crLabelHighlight( crlh ), lvDark( lvd ),
|
|
|
|
defBtnIndicator( dbi ), sliderThumbs( st ), handles( h ), toolbarBorders( tbb ), lvExpander( lve ), lvLines( lvl ), menuIcons( ico ), borderSplitter( true ), popupmenuHighlightLevel(popuplvl)
|
|
|
|
defBtnIndicator( dbi ), sliderThumbs( st ), handles( h ), toolbarBorders( tbb ), lvExpander( lve ), lvLines( lvl ), menuIcons( ico ), borderSplitter( true ), popupmenuHighlightLevel(popuplvl)
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#if KDE_VERSION >= 0x30200
|
|
|
|
#if TDE_VERSION >= 0x30200
|
|
|
|
isTransKicker( false ),
|
|
|
|
isTransKicker( false ),
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
hover( HOVER_NONE ),
|
|
|
|
hover( HOVER_NONE ),
|
|
|
@ -521,14 +521,14 @@ hoverSect( TQTC_NO_SECT ) {
|
|
|
|
void KlearlookStyle::polish( TQApplication *app ) {
|
|
|
|
void KlearlookStyle::polish( TQApplication *app ) {
|
|
|
|
if ( !qstrcmp( app->argv() [ 0 ], "kicker" ) || !qstrcmp( app->argv() [ 0 ], "appletproxy" ) ) {
|
|
|
|
if ( !qstrcmp( app->argv() [ 0 ], "kicker" ) || !qstrcmp( app->argv() [ 0 ], "appletproxy" ) ) {
|
|
|
|
themedApp = APP_KICKER;
|
|
|
|
themedApp = APP_KICKER;
|
|
|
|
#if KDE_VERSION >= 0x30200
|
|
|
|
#if TDE_VERSION >= 0x30200
|
|
|
|
|
|
|
|
|
|
|
|
isTransKicker = rounded && kickerIsTrans();
|
|
|
|
isTransKicker = rounded && kickerIsTrans();
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
} else if ( !qstrcmp( app->argv() [ 0 ], "korn" ) ) {
|
|
|
|
} else if ( !qstrcmp( app->argv() [ 0 ], "korn" ) ) {
|
|
|
|
themedApp = APP_KORN;
|
|
|
|
themedApp = APP_KORN;
|
|
|
|
#if KDE_VERSION >= 0x30200
|
|
|
|
#if TDE_VERSION >= 0x30200
|
|
|
|
|
|
|
|
|
|
|
|
isTransKicker = rounded && kickerIsTrans();
|
|
|
|
isTransKicker = rounded && kickerIsTrans();
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
@ -1334,8 +1334,8 @@ void KlearlookStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, TQPainter *p, cons
|
|
|
|
if ( flags & Style_Down )
|
|
|
|
if ( flags & Style_Down )
|
|
|
|
flags = ( ( flags | Style_Down ) ^ Style_Down ) | Style_Sunken;
|
|
|
|
flags = ( ( flags | Style_Down ) ^ Style_Down ) | Style_Sunken;
|
|
|
|
flags |= Style_Enabled;
|
|
|
|
flags |= Style_Enabled;
|
|
|
|
#if KDE_VERSION >= 0x30200
|
|
|
|
#if TDE_VERSION >= 0x30200
|
|
|
|
#if KDE_VERSION >= 0x30400
|
|
|
|
#if TDE_VERSION >= 0x30400
|
|
|
|
|
|
|
|
|
|
|
|
if ( HOVER_KICKER == hover && hoverWidget ) // && hoverWidget==p->device())
|
|
|
|
if ( HOVER_KICKER == hover && hoverWidget ) // && hoverWidget==p->device())
|
|
|
|
flags |= Style_MouseOver;
|
|
|
|
flags |= Style_MouseOver;
|
|
|
@ -1346,7 +1346,7 @@ void KlearlookStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, TQPainter *p, cons
|
|
|
|
|
|
|
|
|
|
|
|
drawLightBevelButton( p, r, cg, flags | Style_Horizontal,
|
|
|
|
drawLightBevelButton( p, r, cg, flags | Style_Horizontal,
|
|
|
|
true, ROUNDED_ALL, getFill( flags, use ), use );
|
|
|
|
true, ROUNDED_ALL, getFill( flags, use ), use );
|
|
|
|
#if KDE_VERSION >= 0x30200
|
|
|
|
#if TDE_VERSION >= 0x30200
|
|
|
|
|
|
|
|
|
|
|
|
formMode = false;
|
|
|
|
formMode = false;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
@ -1379,7 +1379,7 @@ void KlearlookStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, TQPainter *p, cons
|
|
|
|
|
|
|
|
|
|
|
|
drawLightBevelButton( p, r, cg, flags | Style_Horizontal, true,
|
|
|
|
drawLightBevelButton( p, r, cg, flags | Style_Horizontal, true,
|
|
|
|
r.width() < 16 || r.height() < 16
|
|
|
|
r.width() < 16 || r.height() < 16
|
|
|
|
#if KDE_VERSION >= 0x30200
|
|
|
|
#if TDE_VERSION >= 0x30200
|
|
|
|
|| ( APP_KORN == themedApp && isTransKicker && PE_ButtonTool == pe )
|
|
|
|
|| ( APP_KORN == themedApp && isTransKicker && PE_ButtonTool == pe )
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
? ROUNDED_NONE : ROUNDED_ALL,
|
|
|
|
? ROUNDED_NONE : ROUNDED_ALL,
|
|
|
@ -3106,7 +3106,7 @@ void KlearlookStyle::tqdrawComplexControl(
|
|
|
|
|
|
|
|
|
|
|
|
if ( controls & SC_ToolButton ) {
|
|
|
|
if ( controls & SC_ToolButton ) {
|
|
|
|
// If we're pressed, on, or raised...
|
|
|
|
// If we're pressed, on, or raised...
|
|
|
|
#if KDE_VERSION >= 0x30200
|
|
|
|
#if TDE_VERSION >= 0x30200
|
|
|
|
if ( bflags & ( Style_Down | Style_On | Style_Raised ) || onControlButtons )
|
|
|
|
if ( bflags & ( Style_Down | Style_On | Style_Raised ) || onControlButtons )
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
// CPD: Style_MouseOver obove is *needed* for KDE's KToggleActions...
|
|
|
|
// CPD: Style_MouseOver obove is *needed* for KDE's KToggleActions...
|
|
|
@ -3944,7 +3944,7 @@ bool KlearlookStyle::redrawHoverWidget() {
|
|
|
|
( HOVER_SB_ADD == hover && !addline.contains( oldCursor ) ) ||
|
|
|
|
( HOVER_SB_ADD == hover && !addline.contains( oldCursor ) ) ||
|
|
|
|
( HOVER_SB_ADD != hover && addline.contains( oldCursor ) );
|
|
|
|
( HOVER_SB_ADD != hover && addline.contains( oldCursor ) );
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
#if KDE_VERSION >= 0x30400
|
|
|
|
#if TDE_VERSION >= 0x30400
|
|
|
|
TQToolButton *tb = dynamic_cast<TQToolButton *>( hoverWidget );
|
|
|
|
TQToolButton *tb = dynamic_cast<TQToolButton *>( hoverWidget );
|
|
|
|
|
|
|
|
|
|
|
|
if ( tb ) {
|
|
|
|
if ( tb ) {
|
|
|
@ -3992,7 +3992,7 @@ bool KlearlookStyle::redrawHoverWidget() {
|
|
|
|
return redraw;
|
|
|
|
return redraw;
|
|
|
|
} else
|
|
|
|
} else
|
|
|
|
return oldCursor == TQPoint( -1, -1 );
|
|
|
|
return oldCursor == TQPoint( -1, -1 );
|
|
|
|
#if KDE_VERSION >= 0x30400
|
|
|
|
#if TDE_VERSION >= 0x30400
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|