Merge branch 'master' of github.com:Sankore/Sankore-3.1

preferencesAboutTextFull
Ivan Ilin 13 years ago
commit 212d3086cf
  1. 24
      src/gui/UBLeftPalette.cpp
  2. 4
      src/gui/UBLeftPalette.h
  3. 15
      src/gui/UBPageNavigationWidget.cpp
  4. 1
      src/gui/UBPageNavigationWidget.h
  5. 1
      src/gui/UBRightPalette.cpp

@ -20,11 +20,16 @@ UBLeftPalette::UBLeftPalette(QWidget *parent, const char *name):UBDockPalette(pa
setObjectName(name); setObjectName(name);
setOrientation(eUBDockOrientation_Left); setOrientation(eUBDockOrientation_Left);
mLastWidth = 300; mLastWidth = 300;
setMaximumWidth(300); mCollapseWidth = 180;
resize(UBSettings::settings()->navigPaletteWidth->get().toInt(), height()); /*
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()); mpLayout->setContentsMargins(customMargin(), customMargin(), 2*border() + customMargin(), customMargin());
// Add the widgets here
mpPageNavigator = new UBPageNavigationWidget(this); mpPageNavigator = new UBPageNavigationWidget(this);
addTabWidget(mpPageNavigator); 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() UBPageNavigationWidget* UBLeftPalette::pageNavigator()
{ {
return mpPageNavigator; return mpPageNavigator;

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

@ -141,21 +141,6 @@ void UBPageNavigationWidget::refresh()
mNavigator->setDocument(UBApplication::boardController->activeDocument()); 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 * \brief Notify a timer event
* @param event as the timer event * @param event as the timer event

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

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

Loading…
Cancel
Save