Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 14742 → Rev 14743

/trunk/Scribus/scribus/ui/scrpalettebase.cpp
163,9 → 163,12
storeSize();
}
 
void ScrPaletteBase::show()
void ScrPaletteBase::showEvent(QShowEvent *showEvent)
{
if (palettePrefs)
// According to Qt doc, non-spontaneous show events are sent to widgets
// immediately before they are shown. We want to restore geometry for those
// events as spontaneous events are delivered after dialog has been shown
if (palettePrefs && !showEvent->spontaneous())
{
QDesktopWidget *d = QApplication::desktop();
QSize gStrut = QApplication::globalStrut();
209,7 → 212,7
}
storeVisibility(true);
}
QDialog::show();
QDialog::showEvent(showEvent);
}
 
void ScrPaletteBase::hide()
/trunk/Scribus/scribus/ui/scrpalettebase.h
30,6 → 30,7
#include <QDialog>
#include <QHideEvent>
#include <QKeySequence>
#include <QShowEvent>
 
#include "scribusapi.h"
class PrefsContext;
43,11 → 44,6
~ScrPaletteBase() {};
/** @brief Sample way to grab keystrokes, simply calls superclass at this point */
//virtual void keyPressEvent(QKeyEvent *keyEvent);
/** @brief Captures the close event and changes it to hide */
virtual void closeEvent(QCloseEvent *closeEvent);
/** @brief Stores the geometry of the window when hiding. */
void hideEvent(QHideEvent*);
virtual void show();
virtual void hide();
void startup();
67,6 → 63,13
void storePosition(int newX, int newY);
void storeSize();
void storeVisibility(bool);
 
/** @brief Restore the geometry of the window when showing it. */
virtual void showEvent(QShowEvent *showEvent);
/** @brief Captures the close event and changes it to hide */
virtual void closeEvent(QCloseEvent *closeEvent);
/** @brief Stores the geometry of the window when hiding. */
virtual void hideEvent(QHideEvent*);
PrefsContext* palettePrefs;
QString prefsContextName;