Sankore-316

preferencesAboutTextFull
Ivan Ilin 13 years ago
parent f797f8848b
commit b5a9d6469e
  1. 6
      src/board/UBBoardPaletteManager.cpp
  2. 10
      src/gui/UBDockPalette.cpp
  3. 8
      src/gui/UBDockPalette.h

@ -743,6 +743,9 @@ void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool is
mLeftPalette->setVisible(true);
mRightPalette->setVisible(true);
#ifdef Q_WS_WIN
mRightPalette->setAdditionalVOffset(0);
#endif
if( !isInit )
containerResized();
@ -772,6 +775,9 @@ void UBBoardPaletteManager::changeMode(eUBDockPaletteWidgetMode newMode, bool is
mLeftPalette->setVisible(false);
mRightPalette->setVisible(true);
#ifdef Q_WS_WIN
mRightPalette->setAdditionalVOffset(30);
#endif
if( !isInit )
UBApplication::applicationController->uninotesController()->TransparentWidgetResized();

@ -688,7 +688,7 @@ void UBDockPalette::moveTabs()
}
}
QPoint origin(width(), mHTab);
QPoint origin(width(), mHTab + mTabPalette->mVerticalOffset);
switch (mOrientation) {
case eUBDockOrientation_Left:
@ -732,6 +732,8 @@ void UBDockPalette::setVisible(bool visible)
UBTabDockPalete::UBTabDockPalete(UBDockPalette *dockPalette, QWidget *parent) :
QWidget(parent)
, dock(dockPalette)
, mVerticalOffset(0)
, mFlotable(false)
{
int numTabs = dock->mTabWidgets.size();
resize(2 * dock->border(), (numTabs * TABSIZE) + qMax(numTabs - 1, 0) * dock->tabSpacing());
@ -846,6 +848,12 @@ void UBTabDockPalete::mouseMoveEvent(QMouseEvent *event)
if(dock->mCanResize && ((dock->mMousePressPos - p).manhattanLength() > QApplication::startDragDistance()))
{
if (qAbs(dock->mMousePressPos.y() - p.y()) > 10 && mFlotable) {
qDebug() << "y differences" << dock->mMousePressPos.y() << p.y();
mVerticalOffset += p.y() - dock->mMousePressPos.y();
move(this->pos().x(), p.y());
}
switch(dock->mOrientation) {
case eUBDockOrientation_Left:

@ -71,6 +71,8 @@ protected:
private:
UBDockPalette *dock;
int mVerticalOffset;
bool mFlotable;
};
class UBDockPalette : public QWidget
@ -107,6 +109,12 @@ public:
QVector<UBDockPaletteWidget*> GetWidgetsList() { return mRegisteredWidgets; }
public:
bool isTabFlotable() {return mTabPalette->mFlotable;}
void setTabFlotable(bool newFlotable) {mTabPalette->mFlotable = newFlotable;}
int getAdditionalVOffset() const {return mTabPalette->mVerticalOffset;}
void setAdditionalVOffset(int newOffset) {mTabPalette->mVerticalOffset = newOffset;}
public slots:
void onShowTabWidget(const QString& widgetName);
void onHideTabWidget(const QString& widgetName);

Loading…
Cancel
Save