diff --git a/toonz/sources/include/toonz/preferences.h b/toonz/sources/include/toonz/preferences.h index d4a84a1..be2fa17 100644 --- a/toonz/sources/include/toonz/preferences.h +++ b/toonz/sources/include/toonz/preferences.h @@ -84,6 +84,12 @@ public: ProjectFolderOnly }; + enum FunctionEditorToggle { + ShowGraphEditorInPopup = 0, + ShowFunctionSpreadsheetInPopup, + ToggleBetweenGraphAndSpreadsheet + }; + public: static Preferences *instance(); @@ -235,6 +241,11 @@ public: void setInterfaceFontWeight(int weight); int getInterfaceFontWeight() { return m_interfaceFontWeight; } + void setFunctionEditorToggle(FunctionEditorToggle status); + FunctionEditorToggle getFunctionEditorToggle() { + return m_functionEditorToggle; + } + // color calibration using 3DLUT void enableColorCalibration(bool on); bool isColorCalibrationEnabled() const { return m_colorCalibrationEnabled; } @@ -665,6 +676,9 @@ private: // defines which alias to be used if both are possible on coding file path PathAliasPriority m_pathAliasPriority; + // defines behavior of toggle switch in function editor + FunctionEditorToggle m_functionEditorToggle; + bool m_currentTimelineEnabled; // color calibration using 3DLUT diff --git a/toonz/sources/include/toonzqt/functionpanel.h b/toonz/sources/include/toonzqt/functionpanel.h index 7b3ca62..f58b9f1 100644 --- a/toonz/sources/include/toonzqt/functionpanel.h +++ b/toonz/sources/include/toonzqt/functionpanel.h @@ -75,7 +75,7 @@ private: QPoint m_origin; // axes origin (window coords) QPoint m_startPos, m_oldPos; // mouse click position, last mouse click/drag // position (window coords) - + bool m_isFloating = true; struct Gadget { Handle m_handle; int m_kIndex; @@ -117,7 +117,7 @@ private: } m_curveShape; public: - FunctionPanel(QWidget *parent); + FunctionPanel(QWidget *parent, bool isFloating = true); ~FunctionPanel(); void setModel(FunctionTreeModel *model) { m_functionTreeModel = model; }; diff --git a/toonz/sources/include/toonzqt/functionsheet.h b/toonz/sources/include/toonzqt/functionsheet.h index 50ab831..5eabfc5 100644 --- a/toonz/sources/include/toonzqt/functionsheet.h +++ b/toonz/sources/include/toonzqt/functionsheet.h @@ -98,7 +98,7 @@ class FunctionSheet final : public SpreadsheetViewer { Q_OBJECT public: - FunctionSheet(QWidget *parent = 0); + FunctionSheet(QWidget *parent = 0, bool isFloating = false); ~FunctionSheet(); void setModel(FunctionTreeModel *model); @@ -137,6 +137,7 @@ private: FunctionViewer *m_functionViewer; QRect m_selectedCells; + bool m_isFloating; public slots: diff --git a/toonz/sources/include/toonzqt/functionviewer.h b/toonz/sources/include/toonzqt/functionviewer.h index 57f05fc..413ab58 100644 --- a/toonz/sources/include/toonzqt/functionviewer.h +++ b/toonz/sources/include/toonzqt/functionviewer.h @@ -5,15 +5,18 @@ // TnzCore includes #include "tcommon.h" +#include "saveloadqsettings.h" // TnzLib includes #include "toonz/tframehandle.h" +#include "toonz/preferences.h" // TnzQt includes #include "toonzqt/treemodel.h" // Qt includes #include +#include #undef DVAPI #undef DVVAR @@ -64,7 +67,7 @@ class ValueField; //************************************************************************ // Function editor widget -class DVAPI FunctionViewer final : public QSplitter { +class DVAPI FunctionViewer final : public QSplitter, public SaveLoadQSettings { Q_OBJECT public: @@ -117,6 +120,9 @@ public: void clearFocusColumnsAndGraph(); bool columnsOrGraphHasFocus(); void setSceneHandle(TSceneHandle *sceneHandle); + // SaveLoadQSettings + virtual void save(QSettings &settings) const override; + virtual void load(QSettings &settings) override; signals: @@ -156,6 +162,9 @@ private: TColumnHandle *m_columnHandle; TSceneHandle *m_sceneHandle; QVBoxLayout *m_leftLayout; + int m_spacing; + int m_toggleStatus = 0; + Preferences::FunctionEditorToggle m_toggleStart; TFrameHandle m_localFrame; //!< Internal timeline - which is attached to m_frameHandle //! in case it is not zero. diff --git a/toonz/sources/include/toonzqt/spreadsheetviewer.h b/toonz/sources/include/toonzqt/spreadsheetviewer.h index 4581e40..de65335 100644 --- a/toonz/sources/include/toonzqt/spreadsheetviewer.h +++ b/toonz/sources/include/toonzqt/spreadsheetviewer.h @@ -7,7 +7,8 @@ #include "cellposition.h" #include "toonz/cellpositionratio.h" // #include "orientation.h" -#include + +#include #include #undef DVAPI @@ -223,7 +224,7 @@ protected: //------------------------------------------------------------------- -class DVAPI SpreadsheetViewer : public QFrame { +class DVAPI SpreadsheetViewer : public QDialog { Q_OBJECT QColor m_lightLightBgColor; // RowPanel background (124,124,124) diff --git a/toonz/sources/toonz/preferencespopup.cpp b/toonz/sources/toonz/preferencespopup.cpp index 0ce2685..11a116e 100644 --- a/toonz/sources/toonz/preferencespopup.cpp +++ b/toonz/sources/toonz/preferencespopup.cpp @@ -334,6 +334,13 @@ void PreferencesPopup::onCameraUnitChanged(int index) { //----------------------------------------------------------------------------- +void PreferencesPopup::onFunctionEditorToggleChanged(int index) { + m_pref->setFunctionEditorToggle( + static_cast(index)); +} + +//----------------------------------------------------------------------------- + void PreferencesPopup::onRoomChoiceChanged(int index) { TApp::instance()->writeSettings(); m_pref->setCurrentRoomChoice(index); @@ -1247,8 +1254,9 @@ PreferencesPopup::PreferencesPopup() QComboBox *styleSheetType = new QComboBox(this); m_pixelsOnlyCB = new CheckBox(tr("All imported images will use the same DPI"), this); - m_unitOm = new QComboBox(this); - m_cameraUnitOm = new QComboBox(this); + m_unitOm = new QComboBox(this); + m_cameraUnitOm = new QComboBox(this); + m_functionEditorToggle = new QComboBox(this); // Choose between standard and Studio Ghibli rooms QComboBox *roomChoice = new QComboBox(this); @@ -1552,6 +1560,13 @@ PreferencesPopup::PreferencesPopup() ::units; m_cameraUnitOm->setCurrentIndex((idx < ::unitsCount) ? idx : ::inchIdx); + QStringList functionEditorList; + functionEditorList << tr("Graph Editor Opens in Popup") + << tr("Spreadsheet Opens in Popup") + << tr("Toggle Between Graph Editor and Spreadsheet"); + m_functionEditorToggle->addItems(functionEditorList); + m_functionEditorToggle->setCurrentIndex( + static_cast(m_pref->getFunctionEditorToggle())); QStringList roomList; int currentRoomIndex = 0; for (int i = 0; i < m_pref->getRoomChoiceCount(); i++) { @@ -1952,6 +1967,11 @@ PreferencesPopup::PreferencesPopup() styleLay->addWidget(new QLabel(tr("Rooms*:"), this), 4, 0, Qt::AlignRight | Qt::AlignVCenter); styleLay->addWidget(roomChoice, 4, 1, Qt::AlignLeft | Qt::AlignVCenter); + + styleLay->addWidget(new QLabel(tr("Function Editor*:"), this), 5, 0, + Qt::AlignRight | Qt::AlignVCenter); + styleLay->addWidget(m_functionEditorToggle, 5, 1, + Qt::AlignLeft | Qt::AlignVCenter); } styleLay->setColumnStretch(0, 0); styleLay->setColumnStretch(1, 0); @@ -2576,6 +2596,8 @@ PreferencesPopup::PreferencesPopup() SLOT(onUnitChanged(int))); ret = ret && connect(m_cameraUnitOm, SIGNAL(currentIndexChanged(int)), SLOT(onCameraUnitChanged(int))); + ret = ret && connect(m_functionEditorToggle, SIGNAL(currentIndexChanged(int)), + SLOT(onFunctionEditorToggleChanged(int))); ret = ret && connect(roomChoice, SIGNAL(currentIndexChanged(int)), SLOT(onRoomChoiceChanged(int))); ret = ret && connect(m_iconSizeLx, SIGNAL(editingFinished()), diff --git a/toonz/sources/toonz/preferencespopup.h b/toonz/sources/toonz/preferencespopup.h index b63a535..f7bd4db 100644 --- a/toonz/sources/toonz/preferencespopup.h +++ b/toonz/sources/toonz/preferencespopup.h @@ -55,7 +55,8 @@ private: *m_defLevelType, *m_autocreationType, *m_levelFormatNames, *m_columnIconOm, *m_unitOm, *m_cameraUnitOm, *m_importPolicy, *m_vectorSnappingTargetCB, *m_dropdownShortcutsCycleOptionsCB, - *m_interfaceFont, *m_interfaceFontWeight, *m_guidedDrawingStyle; + *m_interfaceFont, *m_interfaceFontWeight, *m_guidedDrawingStyle, + *m_functionEditorToggle; DVGui::MeasuredDoubleLineEdit *m_defLevelWidth, *m_defLevelHeight; @@ -101,6 +102,7 @@ private slots: void onUnitChanged(int index); void onCameraUnitChanged(int index); void onRoomChoiceChanged(int index); + void onFunctionEditorToggleChanged(int index); void onScanLevelTypeChanged(const QString &text); void onMinuteChanged(); void onIconSizeChanged(); diff --git a/toonz/sources/toonzlib/preferences.cpp b/toonz/sources/toonzlib/preferences.cpp index c7cbd41..6238ed4 100644 --- a/toonz/sources/toonzlib/preferences.cpp +++ b/toonz/sources/toonzlib/preferences.cpp @@ -335,6 +335,7 @@ Preferences::Preferences() , m_xsheetLayoutPreference("Classic-revised") , m_loadedXsheetLayout("Classic-revised") , m_pathAliasPriority(ProjectFolderOnly) + , m_functionEditorToggle(ShowGraphEditorInPopup) , m_currentTimelineEnabled(true) { TCamera camera; m_defLevelType = PLI_XSHLEVEL; @@ -654,6 +655,11 @@ Preferences::Preferences() getValue(*m_settings, "pathAliasPriority", pathAliasPriority); m_pathAliasPriority = static_cast(pathAliasPriority); + int functionEditorToggle = static_cast(m_functionEditorToggle); + getValue(*m_settings, "functionEditorToggle", functionEditorToggle); + m_functionEditorToggle = + static_cast(functionEditorToggle); + QString xsheetLayoutPreference; xsheetLayoutPreference = m_settings->value("xsheetLayoutPreference").toString(); @@ -1634,6 +1640,13 @@ void Preferences::setPathAliasPriority(PathAliasPriority priority) { //----------------------------------------------------------------- +void Preferences::setFunctionEditorToggle(FunctionEditorToggle status) { + m_functionEditorToggle = status; + m_settings->setValue("functionEditorToggle", static_cast(status)); +} + +//----------------------------------------------------------------- + void Preferences::enableCurrentTimelineIndicator(bool on) { m_currentTimelineEnabled = on; m_settings->setValue("currentTimelineEnabled", on ? "1" : "0"); diff --git a/toonz/sources/toonzqt/functionpanel.cpp b/toonz/sources/toonzqt/functionpanel.cpp index 73c40f4..151d139 100644 --- a/toonz/sources/toonzqt/functionpanel.cpp +++ b/toonz/sources/toonzqt/functionpanel.cpp @@ -234,7 +234,7 @@ FunctionPanel::Gadget::Gadget(FunctionPanel::Handle handle, int kIndex, // //----------------------------------------------------------------------------- -FunctionPanel::FunctionPanel(QWidget *parent) +FunctionPanel::FunctionPanel(QWidget *parent, bool isFloating) : QDialog(parent) , m_functionTreeModel(0) , m_viewTransform() @@ -245,7 +245,8 @@ FunctionPanel::FunctionPanel(QWidget *parent) , m_dragTool(0) , m_currentFrameStatus(0) , m_selection(0) - , m_curveShape(SMOOTH) { + , m_curveShape(SMOOTH) + , m_isFloating(isFloating) { setWindowTitle(tr("Function Curves")); m_viewTransform.translate(50, 200); @@ -260,26 +261,30 @@ FunctionPanel::FunctionPanel(QWidget *parent) m_curveLabel.text = ""; m_curveLabel.curve = 0; - // load the dialog size - TFilePath fp(ToonzFolder::getMyModuleDir() + TFilePath(mySettingsFileName)); - QSettings mySettings(toQString(fp), QSettings::IniFormat); + if (m_isFloating) { + // load the dialog size + TFilePath fp(ToonzFolder::getMyModuleDir() + TFilePath(mySettingsFileName)); + QSettings mySettings(toQString(fp), QSettings::IniFormat); - mySettings.beginGroup("Dialogs"); - setGeometry( - mySettings.value("FunctionCurves", QRect(500, 500, 400, 300)).toRect()); - mySettings.endGroup(); + mySettings.beginGroup("Dialogs"); + setGeometry( + mySettings.value("FunctionCurves", QRect(500, 500, 400, 300)).toRect()); + mySettings.endGroup(); + } } //----------------------------------------------------------------------------- FunctionPanel::~FunctionPanel() { - // save the dialog size - TFilePath fp(ToonzFolder::getMyModuleDir() + TFilePath(mySettingsFileName)); - QSettings mySettings(toQString(fp), QSettings::IniFormat); - - mySettings.beginGroup("Dialogs"); - mySettings.setValue("FunctionCurves", geometry()); - mySettings.endGroup(); + if (m_isFloating) { + // save the dialog size + TFilePath fp(ToonzFolder::getMyModuleDir() + TFilePath(mySettingsFileName)); + QSettings mySettings(toQString(fp), QSettings::IniFormat); + + mySettings.beginGroup("Dialogs"); + mySettings.setValue("FunctionCurves", geometry()); + mySettings.endGroup(); + } delete m_dragTool; } diff --git a/toonz/sources/toonzqt/functionsheet.cpp b/toonz/sources/toonzqt/functionsheet.cpp index ebd8819..caf0544 100644 --- a/toonz/sources/toonzqt/functionsheet.cpp +++ b/toonz/sources/toonzqt/functionsheet.cpp @@ -10,6 +10,7 @@ #include "toonz/tframehandle.h" #include "toonz/doubleparamcmd.h" #include "toonz/preferences.h" +#include "toonz/toonzfolders.h" // TnzBase includes #include "tunit.h" @@ -960,18 +961,45 @@ public: // FunctionSheet implementation //******************************************************************************** -FunctionSheet::FunctionSheet(QWidget *parent) - : SpreadsheetViewer(parent), m_selectedCells(), m_selection(0) { +FunctionSheet::FunctionSheet(QWidget *parent, bool isFloating) + : SpreadsheetViewer(parent) + , m_selectedCells() + , m_selection(0) + , m_isFloating(isFloating) { setColumnsPanel(m_columnHeadViewer = new FunctionSheetColumnHeadViewer(this)); setRowsPanel(m_rowViewer = new FunctionSheetRowViewer(this)); setCellsPanel(m_cellViewer = new FunctionSheetCellViewer(this)); + setWindowFlag(Qt::Window); setColumnCount(20); + setWindowTitle(tr("Function Editor")); + setFocusPolicy(Qt::ClickFocus); + + if (m_isFloating) { + // load the dialog size + TFilePath fp(ToonzFolder::getMyModuleDir() + TFilePath(mySettingsFileName)); + QSettings mySettings(toQString(fp), QSettings::IniFormat); + + mySettings.beginGroup("Dialogs"); + setGeometry( + mySettings.value("FunctionSpreadsheet", QRect(500, 500, 400, 300)) + .toRect()); + mySettings.endGroup(); + } } //----------------------------------------------------------------------------- -FunctionSheet::~FunctionSheet() {} +FunctionSheet::~FunctionSheet() { + if (m_isFloating) { + TFilePath fp(ToonzFolder::getMyModuleDir() + TFilePath(mySettingsFileName)); + QSettings mySettings(toQString(fp), QSettings::IniFormat); + + mySettings.beginGroup("Dialogs"); + mySettings.setValue("FunctionSpreadsheet", geometry()); + mySettings.endGroup(); + } +} //----------------------------------------------------------------------------- diff --git a/toonz/sources/toonzqt/functionviewer.cpp b/toonz/sources/toonzqt/functionviewer.cpp index dd28e89..4148a6c 100644 --- a/toonz/sources/toonzqt/functionviewer.cpp +++ b/toonz/sources/toonzqt/functionviewer.cpp @@ -26,11 +26,11 @@ #include "toonz/tproject.h" #include "toonz/tscenehandle.h" #include "toonz/sceneproperties.h" -#include "toonz/preferences.h" // TnzBase includes #include "tparamcontainer.h" #include "tunit.h" +#include "tenv.h" // TnzCore includes #include "tstopwatch.h" @@ -48,6 +48,8 @@ using namespace DVGui; +TEnv::IntVar FunctionEditorToggleStatus("FunctionEditorToggleStatus", 0); + //============================================================================= // // FunctionPanel @@ -73,11 +75,24 @@ FunctionViewer::FunctionViewer(QWidget *parent, Qt::WFlags flags) // Prepare local timeline m_localFrame.setFrame(0); setFocusPolicy(Qt::NoFocus); + m_toggleStart = Preferences::instance()->getFunctionEditorToggle(); + if (m_toggleStart == + Preferences::FunctionEditorToggle::ShowFunctionSpreadsheetInPopup) { + m_functionGraph = new FunctionPanel(this, false); + m_numericalColumns = new FunctionSheet(this, true); + } else if (m_toggleStart == Preferences::FunctionEditorToggle:: + ToggleBetweenGraphAndSpreadsheet) { + m_functionGraph = new FunctionPanel(this, false); + m_numericalColumns = new FunctionSheet(this, false); + } else { + // default values are graph is floating + // and spreadsheet is not floating + m_functionGraph = new FunctionPanel(this); + m_numericalColumns = new FunctionSheet(this); + } + m_treeView = new FunctionTreeView(this); - m_treeView = new FunctionTreeView(this); - m_functionGraph = new FunctionPanel(this); - m_numericalColumns = new FunctionSheet(); - m_toolbar = new FunctionToolbar; + m_toolbar = new FunctionToolbar; m_segmentViewer = new FunctionSegmentViewer(this, m_numericalColumns, m_functionGraph); QWidget *leftPanel = new QWidget(); @@ -118,15 +133,21 @@ FunctionViewer::FunctionViewer(QWidget *parent, Qt::WFlags flags) m_leftLayout->addWidget(m_toolbar); if (Preferences::instance()->isShowXSheetToolbarEnabled() && Preferences::instance()->isExpandFunctionHeaderEnabled()) { - m_leftLayout->addSpacing(65); + m_spacing = 65; } else - m_leftLayout->addSpacing(35); + m_spacing = 35; QString layout = Preferences::instance()->getLoadedXsheetLayout(); - if (layout == QString("Compact")) m_leftLayout->addSpacing(-18); - - m_leftLayout->addWidget(m_numericalColumns); + if (layout == QString("Compact")) m_spacing -= 18; + + if (m_toggleStart != + Preferences::FunctionEditorToggle::ShowGraphEditorInPopup) + m_leftLayout->addWidget(m_functionGraph); + if (m_toggleStart != + Preferences::FunctionEditorToggle::ShowFunctionSpreadsheetInPopup) + m_leftLayout->addWidget(m_numericalColumns); } + leftPanel->setLayout(m_leftLayout); addWidget(leftPanel); @@ -186,8 +207,14 @@ FunctionViewer::FunctionViewer(QWidget *parent, Qt::WFlags flags) SLOT(onCurrentChannelChanged(FunctionTreeModel::Channel *))); assert(ret); - - m_functionGraph->hide(); + if (m_toggleStart == + Preferences::FunctionEditorToggle::ShowGraphEditorInPopup) { + m_functionGraph->hide(); + m_leftLayout->setSpacing(m_spacing); + } + if (m_toggleStart == + Preferences::FunctionEditorToggle::ShowFunctionSpreadsheetInPopup) + m_numericalColumns->hide(); } //----------------------------------------------------------------------------- @@ -258,6 +285,18 @@ void FunctionViewer::showEvent(QShowEvent *) { } if (m_fxHandle) ftm->setCurrentFx(m_fxHandle->getFx()); + if (m_toggleStart == + Preferences::FunctionEditorToggle::ToggleBetweenGraphAndSpreadsheet) { + if (m_toggleStatus == 1) { + m_numericalColumns->hide(); + m_functionGraph->show(); + m_leftLayout->setSpacing(0); + } else { + m_functionGraph->hide(); + m_numericalColumns->show(); + m_leftLayout->setSpacing(m_spacing); + } + } } //----------------------------------------------------------------------------- @@ -268,8 +307,14 @@ void FunctionViewer::hideEvent(QHideEvent *) { if (m_objectHandle) m_objectHandle->disconnect(this); if (m_fxHandle) m_fxHandle->disconnect(this); if (m_sceneHandle) m_sceneHandle->disconnect(this); - - if (m_functionGraph->isVisible()) m_functionGraph->hide(); + if (m_toggleStart == + Preferences::FunctionEditorToggle::ShowGraphEditorInPopup) { + if (m_functionGraph->isVisible()) m_functionGraph->hide(); + } + if (m_toggleStart == + Preferences::FunctionEditorToggle::ShowFunctionSpreadsheetInPopup) { + if (m_numericalColumns->isVisible()) m_numericalColumns->hide(); + } } //----------------------------------------------------------------------------- @@ -429,11 +474,34 @@ void FunctionViewer::onFrameSwitched() { void FunctionViewer::toggleMode() { if (isHidden()) return; - - if (m_functionGraph->isVisible()) - m_functionGraph->hide(); - else - m_functionGraph->show(); + if (m_toggleStart == + Preferences::FunctionEditorToggle::ShowGraphEditorInPopup) { + if (m_functionGraph->isVisible()) { + m_functionGraph->hide(); + } else { + m_functionGraph->show(); + } + } else if (m_toggleStart == Preferences::FunctionEditorToggle:: + ShowFunctionSpreadsheetInPopup) { + if (m_numericalColumns->isVisible()) { + m_numericalColumns->hide(); + } else { + m_numericalColumns->show(); + } + } else if (m_toggleStart == Preferences::FunctionEditorToggle:: + ToggleBetweenGraphAndSpreadsheet) { + if (m_functionGraph->isVisible()) { + m_functionGraph->hide(); + m_numericalColumns->show(); + m_leftLayout->setSpacing(m_spacing); + m_toggleStatus = 0; + } else { + m_functionGraph->show(); + m_numericalColumns->hide(); + m_leftLayout->setSpacing(0); + m_toggleStatus = 1; + } + } } //----------------------------------------------------------------------------- @@ -639,3 +707,18 @@ void FunctionViewer::setSceneHandle(TSceneHandle *sceneHandle) { bool FunctionViewer::isExpressionPageActive() { return m_segmentViewer->isExpressionPageActive(); } + +//---------------------------------------------------------------------------- + +void FunctionViewer::save(QSettings &settings) const { + settings.setValue("toggleStatus", m_toggleStatus); +} + +//---------------------------------------------------------------------------- + +void FunctionViewer::load(QSettings &settings) { + QVariant toggleStatus = settings.value("toggleStatus"); + if (toggleStatus.canConvert(QVariant::Int)) { + m_toggleStatus = toggleStatus.toInt(); + } +} diff --git a/toonz/sources/toonzqt/spreadsheetviewer.cpp b/toonz/sources/toonzqt/spreadsheetviewer.cpp index 37a233c..bcfb895 100644 --- a/toonz/sources/toonzqt/spreadsheetviewer.cpp +++ b/toonz/sources/toonzqt/spreadsheetviewer.cpp @@ -3,7 +3,7 @@ #include "toonzqt/spreadsheetviewer.h" #include "toonzqt/gutil.h" #include "toonz/preferences.h" - +#include "toonz/toonzfolders.h" #include "toonz/tframehandle.h" #include "orientation.h" @@ -19,6 +19,7 @@ #include #include +#include namespace Spreadsheet { @@ -447,7 +448,7 @@ void CellPanel::paintEvent(QPaintEvent *e) { //============================================================================= SpreadsheetViewer::SpreadsheetViewer(QWidget *parent) - : QFrame(parent) + : QDialog(parent) , m_columnScrollArea(0) , m_rowScrollArea(0) , m_cellScrollArea(0) @@ -468,7 +469,7 @@ SpreadsheetViewer::SpreadsheetViewer(QWidget *parent) setFocusPolicy(Qt::NoFocus); - setFrameStyle(QFrame::StyledPanel); + // setFrameStyle(QFrame::StyledPanel); setObjectName("Viewer"); // column header @@ -750,7 +751,7 @@ void SpreadsheetViewer::hideEvent(QHideEvent *) { } void SpreadsheetViewer::resizeEvent(QResizeEvent *e) { - QFrame::resizeEvent(e); + QDialog::resizeEvent(e); refreshContentSize(0, 0); /* int w = width();