git-svn-id: svn://db.shs.com.ru/libs@436 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -280,7 +280,9 @@ void EMainWindow::changedDock() {
|
|||||||
tbars << t;
|
tbars << t;
|
||||||
connect(t, SIGNAL(tabCloseRequested(int)), this, SLOT(closeDock(int)));
|
connect(t, SIGNAL(tabCloseRequested(int)), this, SLOT(closeDock(int)));
|
||||||
t->installEventFilter(this);
|
t->installEventFilter(this);
|
||||||
|
#ifndef Q_OS_MACOS
|
||||||
t->setIconSize(dockTabsIconSize());
|
t->setIconSize(dockTabsIconSize());
|
||||||
|
#endif
|
||||||
t->setTabsClosable(true);
|
t->setTabsClosable(true);
|
||||||
}
|
}
|
||||||
// qDebug() << "tab" << t << t->count();
|
// qDebug() << "tab" << t << t->count();
|
||||||
@@ -288,10 +290,10 @@ void EMainWindow::changedDock() {
|
|||||||
dock = (QDockWidget * )t->tabData(i).toULongLong();
|
dock = (QDockWidget * )t->tabData(i).toULongLong();
|
||||||
//qDebug() << i << t->tabData(i);
|
//qDebug() << i << t->tabData(i);
|
||||||
if (dock == 0) continue;
|
if (dock == 0) continue;
|
||||||
t->setIconSize(dockTabsIconSize());
|
|
||||||
#ifndef Q_OS_MACOS
|
#ifndef Q_OS_MACOS
|
||||||
t->setTabIcon(i, dock->windowIcon());
|
t->setIconSize(dockTabsIconSize());
|
||||||
#endif
|
#endif
|
||||||
|
t->setTabIcon(i, dock->windowIcon());
|
||||||
docks_tabs << dock;
|
docks_tabs << dock;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,9 +89,9 @@ void Ribbon::init() {
|
|||||||
i->setProperty("__icon", QVariant::fromValue<QIcon>(tic));
|
i->setProperty("__icon", QVariant::fromValue<QIcon>(tic));
|
||||||
else
|
else
|
||||||
tic = i->property("__icon").value<QIcon>();
|
tic = i->property("__icon").value<QIcon>();
|
||||||
#ifdef Q_OS_MACOS
|
//#ifdef Q_OS_MACOS
|
||||||
tic = QIcon();
|
// tic = QIcon();
|
||||||
#endif
|
//#endif
|
||||||
tab->addTab(new QWidget(), tic, i->text());
|
tab->addTab(new QWidget(), tic, i->text());
|
||||||
//qDebug() << this << i->icon() << i->text();
|
//qDebug() << this << i->icon() << i->text();
|
||||||
//continue;
|
//continue;
|
||||||
@@ -107,7 +107,11 @@ void Ribbon::init() {
|
|||||||
i->setIcon(QIcon());
|
i->setIcon(QIcon());
|
||||||
tl = new QBoxLayout(QBoxLayout::LeftToRight);
|
tl = new QBoxLayout(QBoxLayout::LeftToRight);
|
||||||
tl->setSpacing(2);
|
tl->setSpacing(2);
|
||||||
|
#ifndef Q_OS_MACOS
|
||||||
tl->setContentsMargins(2, 2, 2, 2);
|
tl->setContentsMargins(2, 2, 2, 2);
|
||||||
|
#else
|
||||||
|
tl->setContentsMargins(2, 0, 2, 2);
|
||||||
|
#endif
|
||||||
g = new QGroupBox();
|
g = new QGroupBox();
|
||||||
l = new QBoxLayout(QBoxLayout::LeftToRight);
|
l = new QBoxLayout(QBoxLayout::LeftToRight);
|
||||||
g->setLayout(l);
|
g->setLayout(l);
|
||||||
@@ -209,6 +213,8 @@ void Ribbon::setIconSize(const QSize & size) {
|
|||||||
|
|
||||||
|
|
||||||
void Ribbon::setTabIconSize(const QSize & size) {
|
void Ribbon::setTabIconSize(const QSize & size) {
|
||||||
|
#ifndef Q_OS_MACOS
|
||||||
tab->setIconSize(size);
|
tab->setIconSize(size);
|
||||||
|
#endif
|
||||||
_resize();
|
_resize();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -275,13 +275,13 @@ actions_Z_up(this), actions_Z_top(this), actions_Z_down(this), actions_Z_bottom(
|
|||||||
actions_Z_down.setText(trUtf8("Send\nbackward")); actions_Z_down.setIcon(QIcon(":/icons/z-down.png")); actions_Z_down.setEnabled(false);
|
actions_Z_down.setText(trUtf8("Send\nbackward")); actions_Z_down.setIcon(QIcon(":/icons/z-down.png")); actions_Z_down.setEnabled(false);
|
||||||
actions_Z_bottom.setText(trUtf8("Send\nto back")); actions_Z_bottom.setIcon(QIcon(":/icons/z-bottom.png")); actions_Z_bottom.setEnabled(false);
|
actions_Z_bottom.setText(trUtf8("Send\nto back")); actions_Z_bottom.setIcon(QIcon(":/icons/z-bottom.png")); actions_Z_bottom.setEnabled(false);
|
||||||
actions_add << newAction(trUtf8("Draw\nRectangle"), QIcon(":/icons/draw-rectangle.png"), 1)
|
actions_add << newAction(trUtf8("Draw\nRectangle"), QIcon(":/icons/draw-rectangle.png"), 1)
|
||||||
<< newAction(trUtf8("Draw\nEllipse"), QIcon(":/icons/draw-ellipse.png"), 2)
|
<< newAction(trUtf8("Draw\nEllipse"), QIcon(":/icons/draw-ellipse.png"), 2)
|
||||||
<< newAction(trUtf8("Draw\nLine"), QIcon(":/icons/draw-line.png"), 4)
|
<< newAction(trUtf8("Draw\nLine"), QIcon(":/icons/draw-line.png"), 4)
|
||||||
<< newAction(trUtf8("Draw\nText"), QIcon(":/icons/draw-text.png"), 0)
|
<< newAction(trUtf8("Draw\nText"), QIcon(":/icons/draw-text.png"), 0)
|
||||||
<< newAction(trUtf8("Draw\nImage"), QIcon(":/icons/view-preview.png"), 3);
|
<< newAction(trUtf8("Draw\nImage"), QIcon(":/icons/view-preview.png"), 3);
|
||||||
buttons_align << ui->buttonAlignTL << ui->buttonAlignTC << ui->buttonAlignTR
|
buttons_align << ui->buttonAlignTL << ui->buttonAlignTC << ui->buttonAlignTR
|
||||||
<< ui->buttonAlignCL << ui->buttonAlignCC << ui->buttonAlignCR
|
<< ui->buttonAlignCL << ui->buttonAlignCC << ui->buttonAlignCR
|
||||||
<< ui->buttonAlignBL << ui->buttonAlignBC << ui->buttonAlignBR;
|
<< ui->buttonAlignBL << ui->buttonAlignBC << ui->buttonAlignBR;
|
||||||
foreach (QAction * a, actions_add)
|
foreach (QAction * a, actions_add)
|
||||||
connect(a, SIGNAL(toggled(bool)), this, SLOT(toggleNewItem(bool)));
|
connect(a, SIGNAL(toggled(bool)), this, SLOT(toggleNewItem(bool)));
|
||||||
foreach (QToolButton * b, buttons_align)
|
foreach (QToolButton * b, buttons_align)
|
||||||
|
|||||||
Reference in New Issue
Block a user