Disable titlebar double click (#67)

* Remove classic xsheet layout. Set compact default.

* Disable double click on non viewer titlebars
This commit is contained in:
Jeremy Bullock 2020-07-01 00:48:21 -06:00 committed by GitHub
parent a63e912d60
commit a57d5ece0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 7 deletions

View file

@ -1172,8 +1172,7 @@ QList<ComboBoxItem> PreferencesPopup::getComboItemList(
{tr("Enable Tools For Level Only"), 1},
{tr("Show Tools For Level Only"), 2}}},
{xsheetLayoutPreference,
{{tr("Compact"), "Compact"},
{tr("Roomy"), "Roomy"}}},
{{tr("Compact"), "Compact"}, {tr("Roomy"), "Roomy"}}},
{DragCellsBehaviour,
{{tr("Cells Only"), 0}, {tr("Cells and Column Data"), 1}}},
{keyframeType, // note that the value starts from 1, not 0

View file

@ -84,9 +84,15 @@ Toolbar::Toolbar(QWidget *parent, bool isVertical)
SLOT(setIsExpanded(bool)));
updateToolbar();
QIcon moreIcon(":Resources/moredown.svg");
QToolButton *more = findChild<QToolButton *>("qt_toolbar_ext_button");
more->setIcon(moreIcon);
if (isVertical) {
QIcon moreIcon(":Resources/moredown.svg");
QToolButton *more = findChild<QToolButton *>("qt_toolbar_ext_button");
more->setIcon(moreIcon);
} else {
QIcon moreIcon(":Resources/more.svg");
QToolButton *more = findChild<QToolButton *>("qt_toolbar_ext_button");
more->setIcon(moreIcon);
}
}
//-----------------------------------------------------------------------------

View file

@ -378,8 +378,11 @@ void DockWidget::mouseReleaseEvent(QMouseEvent *me) {
//! DockWidgets respond to title bar double clicks maximizing the widget in
//! layout's contents rect.
void DockWidget::mouseDoubleClickEvent(QMouseEvent *me) {
if (!m_floating && isDragGrip(me->pos())) {
parentLayout()->setMaximized(this, !m_maximized);
std::string name = objectName().toStdString();
if (name == "FlipBook" || name == "SceneViewer" || name == "ComboViewer") {
if (!m_floating && isDragGrip(me->pos())) {
parentLayout()->setMaximized(this, !m_maximized);
}
}
}