Fixed logout UI glitch

Improved appearance of KDM O2 Enterprise theme


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1179564 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 14 years ago
parent af3b8b850e
commit 5e9ef0f086

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

@ -33,6 +33,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <tqstyle.h>
#include <tqtimer.h>
#include <tqtooltip.h>
#include <tqeventloop.h>
#include <dcopclient.h>
#include <kapplication.h>
@ -115,6 +116,39 @@ void PanelKMenu::slotServiceStartedByStorageId(TQString starter,
}
}
void PanelKMenu::hideMenu()
{
hide();
// Try to redraw the area under the menu
// Qt makes this surprisingly difficult to do in a timely fashion!
while (isShown() == true)
kapp->eventLoop()->processEvents(1000);
TQTimer *windowtimer = new TQTimer( this );
connect( windowtimer, SIGNAL(timeout()), this, SLOT(windowClearTimeout()) );
windowTimerTimedOut = false;
windowtimer->start( 0, TRUE ); // Wait for all window system events to be processed
while (windowTimerTimedOut == false)
kapp->eventLoop()->processEvents(TQEventLoop::ExcludeUserInput, 1000);
// HACK
// The K Menu takes an unknown amount of time to disappear, and redrawing
// the underlying window(s) also takes time. This should allow both of those
// events to occur (unless you're on a 200MHz Pentium 1 or similar ;-))
// thereby removing a bad shutdown screen artifact while still providing
// a somewhat snappy user interface.
TQTimer *delaytimer = new TQTimer( this );
connect( delaytimer, SIGNAL(timeout()), this, SLOT(windowClearTimeout()) );
windowTimerTimedOut = false;
delaytimer->start( 100, TRUE ); // Wait for 100 milliseconds
while (windowTimerTimedOut == false)
kapp->eventLoop()->processEvents(TQEventLoop::ExcludeUserInput, 1000);
}
void PanelKMenu::windowClearTimeout()
{
windowTimerTimedOut = true;
}
bool PanelKMenu::loadSidePixmap()
{

@ -50,6 +50,7 @@ class PanelKMenu : public PanelServiceMenu, public DCOPObject
k_dcop:
void slotServiceStartedByStorageId(TQString starter, TQString desktopPath);
void hideMenu();
public:
PanelKMenu();
@ -86,6 +87,7 @@ protected slots:
virtual void configChanged();
void updateRecent();
void repairDisplay();
void windowClearTimeout();
protected:
TQRect sideImageRect();
@ -117,6 +119,7 @@ private:
static const int searchLineID;
TQTimer *displayRepairTimer;
bool displayRepaired;
bool windowTimerTimedOut;
};
#endif

@ -1,6 +1,7 @@
/*****************************************************************
ksmserver - the KDE session management server
Copyright (C) 2010 Timothy Pearson <kb9vqf@pearsoncomputing.net>
Copyright (C) 2000 Matthias Ettrich <ettrich@kde.org>
******************************************************************/
@ -27,6 +28,7 @@ Copyright (C) 2000 Matthias Ettrich <ettrich@kde.org>
#include <tqpainter.h>
#include <tqfontmetrics.h>
#include <tqregexp.h>
#include <tqeventloop.h>
#include <klocale.h>
#include <kconfig.h>
@ -72,10 +74,12 @@ KSMShutdownFeedback::KSMShutdownFeedback()
m_unfadedImage(),
m_grayImage(),
m_fadeTime(),
m_pmio()
m_pmio(),
m_greyImageCreated( FALSE )
{
m_grayImage = TQImage::TQImage();
DCOPRef("kicker", "KMenu").call("hideMenu"); // Make sure the K Menu is completely removed from the screen before taking a snapshot...
m_grayImage = TQPixmap::grabWindow(qt_xrootwin(), 0, 0, TQApplication::desktop()->width(), TQApplication::desktop()->height()).convertToImage();
m_unfadedImage = TQImage::TQImage();
resize(0, 0);
setShown(true);
@ -110,13 +114,13 @@ void KSMShutdownFeedback::slotPaintEffect()
// if slotPaintEffect() is called first time, we have to initialize the gray image
// we also could do that in the constructor, but then the displaying of the
// logout-UI would be too much delayed...
if ( m_grayImage.isNull() )
if ( m_greyImageCreated == false )
{
m_greyImageCreated = true;
setBackgroundMode( TQWidget::NoBackground );
setGeometry( TQApplication::desktop()->geometry() );
m_root.resize( width(), height() ); // for the default logout
m_grayImage = TQPixmap::grabWindow(qt_xrootwin(), 0, 0, TQApplication::desktop()->width(), TQApplication::desktop()->height()).convertToImage();
m_unfadedImage = m_grayImage.copy();
register uchar * r = m_grayImage.bits();
register uchar * g = m_grayImage.bits() + 1;
@ -266,7 +270,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent,
{
TQVBoxLayout* vbox = new TQVBoxLayout( this );
TQFrame* frame = new TQFrame( this );
frame->setFrameStyle( TQFrame::StyledPanel | TQFrame::Raised );

@ -66,6 +66,7 @@ private:
TQTime m_fadeTime;
int m_rowsDone;
KPixmapIO m_pmio;
bool m_greyImageCreated;
};

Loading…
Cancel
Save