|
|
|
@ -74,7 +74,7 @@ DEALINGS IN THE SOFTWARE.
|
|
|
|
|
#include "klearlook.h"
|
|
|
|
|
#include <tqsettings.h>
|
|
|
|
|
|
|
|
|
|
#if KDE_VERSION >= 0x30200
|
|
|
|
|
#if TDE_VERSION >= 0x30200
|
|
|
|
|
#include <tqfile.h>
|
|
|
|
|
#include <tqdir.h>
|
|
|
|
|
#endif
|
|
|
|
@ -102,7 +102,7 @@ static const int itemFrame = 2;
|
|
|
|
|
static const int arrowHMargin = 6;
|
|
|
|
|
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...
|
|
|
|
|
|
|
|
|
|
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 ),
|
|
|
|
|
defBtnIndicator( dbi ), sliderThumbs( st ), handles( h ), toolbarBorders( tbb ), lvExpander( lve ), lvLines( lvl ), menuIcons( ico ), borderSplitter( true ), popupmenuHighlightLevel(popuplvl)
|
|
|
|
|
#endif
|
|
|
|
|
#if KDE_VERSION >= 0x30200
|
|
|
|
|
#if TDE_VERSION >= 0x30200
|
|
|
|
|
isTransKicker( false ),
|
|
|
|
|
#endif
|
|
|
|
|
hover( HOVER_NONE ),
|
|
|
|
@ -521,14 +521,14 @@ hoverSect( TQTC_NO_SECT ) {
|
|
|
|
|
void KlearlookStyle::polish( TQApplication *app ) {
|
|
|
|
|
if ( !qstrcmp( app->argv() [ 0 ], "kicker" ) || !qstrcmp( app->argv() [ 0 ], "appletproxy" ) ) {
|
|
|
|
|
themedApp = APP_KICKER;
|
|
|
|
|
#if KDE_VERSION >= 0x30200
|
|
|
|
|
#if TDE_VERSION >= 0x30200
|
|
|
|
|
|
|
|
|
|
isTransKicker = rounded && kickerIsTrans();
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
} else if ( !qstrcmp( app->argv() [ 0 ], "korn" ) ) {
|
|
|
|
|
themedApp = APP_KORN;
|
|
|
|
|
#if KDE_VERSION >= 0x30200
|
|
|
|
|
#if TDE_VERSION >= 0x30200
|
|
|
|
|
|
|
|
|
|
isTransKicker = rounded && kickerIsTrans();
|
|
|
|
|
#endif
|
|
|
|
@ -1334,8 +1334,8 @@ void KlearlookStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, TQPainter *p, cons
|
|
|
|
|
if ( flags & Style_Down )
|
|
|
|
|
flags = ( ( flags | Style_Down ) ^ Style_Down ) | Style_Sunken;
|
|
|
|
|
flags |= Style_Enabled;
|
|
|
|
|
#if KDE_VERSION >= 0x30200
|
|
|
|
|
#if KDE_VERSION >= 0x30400
|
|
|
|
|
#if TDE_VERSION >= 0x30200
|
|
|
|
|
#if TDE_VERSION >= 0x30400
|
|
|
|
|
|
|
|
|
|
if ( HOVER_KICKER == hover && hoverWidget ) // && hoverWidget==p->device())
|
|
|
|
|
flags |= Style_MouseOver;
|
|
|
|
@ -1346,7 +1346,7 @@ void KlearlookStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, TQPainter *p, cons
|
|
|
|
|
|
|
|
|
|
drawLightBevelButton( p, r, cg, flags | Style_Horizontal,
|
|
|
|
|
true, ROUNDED_ALL, getFill( flags, use ), use );
|
|
|
|
|
#if KDE_VERSION >= 0x30200
|
|
|
|
|
#if TDE_VERSION >= 0x30200
|
|
|
|
|
|
|
|
|
|
formMode = false;
|
|
|
|
|
#endif
|
|
|
|
@ -1379,7 +1379,7 @@ void KlearlookStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, TQPainter *p, cons
|
|
|
|
|
|
|
|
|
|
drawLightBevelButton( p, r, cg, flags | Style_Horizontal, true,
|
|
|
|
|
r.width() < 16 || r.height() < 16
|
|
|
|
|
#if KDE_VERSION >= 0x30200
|
|
|
|
|
#if TDE_VERSION >= 0x30200
|
|
|
|
|
|| ( APP_KORN == themedApp && isTransKicker && PE_ButtonTool == pe )
|
|
|
|
|
#endif
|
|
|
|
|
? ROUNDED_NONE : ROUNDED_ALL,
|
|
|
|
@ -3106,7 +3106,7 @@ void KlearlookStyle::tqdrawComplexControl(
|
|
|
|
|
|
|
|
|
|
if ( controls & SC_ToolButton ) {
|
|
|
|
|
// If we're pressed, on, or raised...
|
|
|
|
|
#if KDE_VERSION >= 0x30200
|
|
|
|
|
#if TDE_VERSION >= 0x30200
|
|
|
|
|
if ( bflags & ( Style_Down | Style_On | Style_Raised ) || onControlButtons )
|
|
|
|
|
#else
|
|
|
|
|
// 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 ) );
|
|
|
|
|
} else {
|
|
|
|
|
#if KDE_VERSION >= 0x30400
|
|
|
|
|
#if TDE_VERSION >= 0x30400
|
|
|
|
|
TQToolButton *tb = dynamic_cast<TQToolButton *>( hoverWidget );
|
|
|
|
|
|
|
|
|
|
if ( tb ) {
|
|
|
|
@ -3992,7 +3992,7 @@ bool KlearlookStyle::redrawHoverWidget() {
|
|
|
|
|
return redraw;
|
|
|
|
|
} else
|
|
|
|
|
return oldCursor == TQPoint( -1, -1 );
|
|
|
|
|
#if KDE_VERSION >= 0x30400
|
|
|
|
|
#if TDE_VERSION >= 0x30400
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|