Double-click problems are now hopefully fixed.
Also patched some small drawing bugs when no theme files are present. svn path=/trunk/kdebase/kwin/; revision=94043icc-effect-5.14.5
parent
6c7cd20690
commit
0d00fc700a
|
@ -105,7 +105,6 @@ bool showMenuButtonIcon = false; // Draw a mini icon over the menu pixmap.
|
||||||
bool customButtonPositions = false; // Let the theme dictate the btn pos.
|
bool customButtonPositions = false; // Let the theme dictate the btn pos.
|
||||||
bool titleBarCentered = true;
|
bool titleBarCentered = true;
|
||||||
|
|
||||||
#define TITLE_TEXT_SIZE_POLICY QSizePolicy::Preferred
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -725,7 +724,7 @@ IceWMClient::IceWMClient( Workspace *ws, WId w, QWidget *parent, const char *nam
|
||||||
titleSpacerP = addPixmapSpacer( titleP );
|
titleSpacerP = addPixmapSpacer( titleP );
|
||||||
|
|
||||||
titlebar = new QSpacerItem( titleTextWidth(caption()), titleBarHeight,
|
titlebar = new QSpacerItem( titleTextWidth(caption()), titleBarHeight,
|
||||||
TITLE_TEXT_SIZE_POLICY, QSizePolicy::Fixed );
|
QSizePolicy::Preferred, QSizePolicy::Fixed );
|
||||||
hb->addItem(titlebar);
|
hb->addItem(titlebar);
|
||||||
|
|
||||||
titleSpacerM = addPixmapSpacer( titleM );
|
titleSpacerM = addPixmapSpacer( titleM );
|
||||||
|
@ -1092,7 +1091,7 @@ void IceWMClient::paintEvent( QPaintEvent* )
|
||||||
p2.drawText(rx, 0, rw, titleBarHeight, AlignLeft|AlignVCenter, caption());
|
p2.drawText(rx, 0, rw, titleBarHeight, AlignLeft|AlignVCenter, caption());
|
||||||
p2.end();
|
p2.end();
|
||||||
|
|
||||||
bitBlt( this, hb->geometry().topLeft(), titleBuffer );
|
bitBlt( this, borderSizeX, hb->geometry().y(), titleBuffer );
|
||||||
|
|
||||||
delete titleBuffer;
|
delete titleBuffer;
|
||||||
}
|
}
|
||||||
|
@ -1103,7 +1102,7 @@ void IceWMClient::showEvent(QShowEvent *ev)
|
||||||
calcHiddenButtons();
|
calcHiddenButtons();
|
||||||
|
|
||||||
titlebar->changeSize( titleTextWidth(caption()), titleBarHeight,
|
titlebar->changeSize( titleTextWidth(caption()), titleBarHeight,
|
||||||
TITLE_TEXT_SIZE_POLICY, QSizePolicy::Fixed );
|
QSizePolicy::Preferred, QSizePolicy::Fixed );
|
||||||
grid->activate();
|
grid->activate();
|
||||||
show();
|
show();
|
||||||
Client::showEvent(ev);
|
Client::showEvent(ev);
|
||||||
|
@ -1112,7 +1111,12 @@ void IceWMClient::showEvent(QShowEvent *ev)
|
||||||
|
|
||||||
void IceWMClient::mouseDoubleClickEvent( QMouseEvent * e )
|
void IceWMClient::mouseDoubleClickEvent( QMouseEvent * e )
|
||||||
{
|
{
|
||||||
QRect r( borderSizeX, borderSizeY, geometry().width()-(2*borderSizeX), titleBarHeight);
|
QRect r;
|
||||||
|
|
||||||
|
if (titleBarOnTop)
|
||||||
|
r.setRect( borderSizeX, borderSizeY, width()-(2*borderSizeX), titleBarHeight);
|
||||||
|
else
|
||||||
|
r.setRect( borderSizeX, height()-borderSizeY-titleBarHeight, width()-(2*borderSizeX), titleBarHeight);
|
||||||
|
|
||||||
if ( r.contains( e->pos() ) )
|
if ( r.contains( e->pos() ) )
|
||||||
workspace()->performWindowOperation( this, options->operationTitlebarDblClick() );
|
workspace()->performWindowOperation( this, options->operationTitlebarDblClick() );
|
||||||
|
@ -1141,7 +1145,7 @@ void IceWMClient::captionChange( const QString& s )
|
||||||
QRect r( 0, borderSizeY, geometry().width(), titleBarHeight);
|
QRect r( 0, borderSizeY, geometry().width(), titleBarHeight);
|
||||||
|
|
||||||
titlebar->changeSize( titleTextWidth( s ), titleBarHeight,
|
titlebar->changeSize( titleTextWidth( s ), titleBarHeight,
|
||||||
TITLE_TEXT_SIZE_POLICY, QSizePolicy::Fixed );
|
QSizePolicy::Preferred, QSizePolicy::Fixed );
|
||||||
titlebar->invalidate();
|
titlebar->invalidate();
|
||||||
grid->activate();
|
grid->activate();
|
||||||
repaint( r, false );
|
repaint( r, false );
|
||||||
|
|
Loading…
Reference in New Issue