Fixed an issue related to the automatic resize of the left dock palette

preferencesAboutTextFull
shibakaneki 13 years ago
parent 6273693eed
commit ac53fc94d5
  1. 5
      src/desktop/UBCustomCaptureWindow.cpp
  2. 24
      src/gui/UBLeftPalette.cpp
  3. 4
      src/gui/UBLeftPalette.h
  4. 15
      src/gui/UBPageNavigationWidget.cpp
  5. 1
      src/gui/UBPageNavigationWidget.h
  6. 1
      src/gui/UBRightPalette.cpp

@ -62,7 +62,10 @@ int UBCustomCaptureWindow::execute(const QPixmap &pScreenPixmap)
showFullScreen();
setWindowOpacity(1.0);
return exec();
qDebug() << ">>>>>>>>>>>>>< BEFORE";
int retVal = exec();
qDebug() << "------------------ AFTER";
return retVal;
}

@ -20,11 +20,16 @@ UBLeftPalette::UBLeftPalette(QWidget *parent, const char *name):UBDockPalette(pa
setObjectName(name);
setOrientation(eUBDockOrientation_Left);
mLastWidth = 300;
setMaximumWidth(300);
resize(UBSettings::settings()->navigPaletteWidth->get().toInt(), height());
mCollapseWidth = 180;
/*
resize(UBSettings::settings()->libPaletteWidth->get().toInt(), parentWidget()->height());
mpLayout->setContentsMargins(2*border() + customMargin(), customMargin(), customMargin(), customMargin());
*/
resize(UBSettings::settings()->navigPaletteWidth->get().toInt(), parentWidget()->height());
mpLayout->setContentsMargins(customMargin(), customMargin(), 2*border() + customMargin(), customMargin());
// Add the widgets here
mpPageNavigator = new UBPageNavigationWidget(this);
addTabWidget(mpPageNavigator);
}
@ -38,6 +43,21 @@ UBLeftPalette::~UBLeftPalette()
}
}
void UBLeftPalette::updateMaxWidth()
{
setMaximumWidth(300);
}
void UBLeftPalette::resizeEvent(QResizeEvent *event)
{
UBDockPalette::resizeEvent(event);
if(NULL != mpPageNavigator)
{
mpPageNavigator->setMinimumHeight(height() - 2*border());
}
UBSettings::settings()->navigPaletteWidth->set(width());
}
UBPageNavigationWidget* UBLeftPalette::pageNavigator()
{
return mpPageNavigator;

@ -26,6 +26,10 @@ public:
UBPageNavigationWidget* pageNavigator();
protected:
void updateMaxWidth();
void resizeEvent(QResizeEvent *event);
private:
UBPageNavigationWidget* mpPageNavigator;

@ -141,21 +141,6 @@ void UBPageNavigationWidget::refresh()
mNavigator->setDocument(UBApplication::boardController->activeDocument());
}
/**
* \brief Handle the resize event
* @param event as the resize event
*/
void UBPageNavigationWidget::resizeEvent(QResizeEvent *event)
{
emit resizeRequest(event);
//UBDockPalette::resizeEvent(event);
if(NULL != mNavigator)
{
mNavigator->setMinimumHeight(height() - 2*border());
}
UBSettings::settings()->navigPaletteWidth->set(width());
}
/**
* \brief Notify a timer event
* @param event as the timer event

@ -43,7 +43,6 @@ public slots:
void setPageNumber(int current, int total);
protected:
virtual void resizeEvent(QResizeEvent *event);
virtual void timerEvent(QTimerEvent *event);
private:

@ -23,7 +23,6 @@ UBRightPalette::UBRightPalette(QWidget *parent, const char *name):UBDockPalette(
{
setObjectName(name);
setOrientation(eUBDockOrientation_Right);
setOrientation(eUBDockOrientation_Right);
mCollapseWidth = 180;
mLastWidth = 300;
resize(UBSettings::settings()->libPaletteWidth->get().toInt(), parentWidget()->height());

Loading…
Cancel
Save