Commit 212d3086 authored by Ivan Ilin's avatar Ivan Ilin

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

parents a891bccd 3c3e8246
......@@ -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());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment