1
0
mirror of https://gitlab.com/pholy/OSCAR-code.git synced 2025-04-07 03:30:44 +00:00

Allow daily panel to shrink

This commit is contained in:
Phil Olynyk 2019-01-30 16:59:08 -05:00
parent b365e21e17
commit 5eb96ef955
3 changed files with 8 additions and 6 deletions

View File

@ -74,7 +74,7 @@ public:
m_scrollDampening = initPref(STR_US_ScrollDampening, (int)50).toInt(); m_scrollDampening = initPref(STR_US_ScrollDampening, (int)50).toInt();
m_tooltipTimeout = initPref(STR_US_TooltipTimeout, (int)2500).toInt(); m_tooltipTimeout = initPref(STR_US_TooltipTimeout, (int)2500).toInt();
m_graphHeight=initPref(STR_AS_GraphHeight, 180).toInt(); m_graphHeight=initPref(STR_AS_GraphHeight, 180).toInt();
initPref(STR_AS_DailyPanelWidth, 350.0); initPref(STR_AS_DailyPanelWidth, 250.0);
initPref(STR_AS_RightPanelWidth, 230.0); initPref(STR_AS_RightPanelWidth, 230.0);
m_antiAliasing=initPref(STR_AS_AntiAliasing, true).toBool(); m_antiAliasing=initPref(STR_AS_AntiAliasing, true).toBool();
initPref(STR_AS_GraphSnapshots, true); initPref(STR_AS_GraphSnapshots, true);

View File

@ -58,6 +58,7 @@ void Daily::setSidebarVisible(bool visible)
int panel_width = visible ? AppSetting->dailyPanelWidth() : 0; int panel_width = visible ? AppSetting->dailyPanelWidth() : 0;
qDebug() << "Daily Left Panel Width is " << panel_width;
a.push_back(panel_width); a.push_back(panel_width);
a.push_back(this->width() - panel_width); a.push_back(this->width() - panel_width);
ui->splitter_2->setStretchFactor(1,1); ui->splitter_2->setStretchFactor(1,1);
@ -428,7 +429,7 @@ Daily::~Daily()
disconnect(GraphView, SIGNAL(GraphsChanged()), this, SLOT(updateGraphCombo())); disconnect(GraphView, SIGNAL(GraphsChanged()), this, SLOT(updateGraphCombo()));
disconnect(sessionbar, SIGNAL(sessionClicked(Session*)), this, SLOT(doToggleSession(Session*))); disconnect(sessionbar, SIGNAL(sessionClicked(Session*)), this, SLOT(doToggleSession(Session*)));
disconnect(webView,SIGNAL(linkClicked(QUrl)),this,SLOT(Link_clicked(QUrl))); disconnect(webView,SIGNAL(anchorClicked(QUrl)),this,SLOT(Link_clicked(QUrl)));
if (previous_date.isValid()) if (previous_date.isValid())
Unload(previous_date); Unload(previous_date);
@ -2417,5 +2418,6 @@ void Daily::on_splitter_2_splitterMoved(int, int)
{ {
int size = ui->splitter_2->sizes()[0]; int size = ui->splitter_2->sizes()[0];
if (size == 0) return; if (size == 0) return;
qDebug() << "Left Panel width set to " << size;
AppSetting->setDailyPanelWidth(size); AppSetting->setDailyPanelWidth(size);
} }

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>561</width> <width>968</width>
<height>444</height> <height>452</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -851,7 +851,7 @@ QToolButton:pressed {
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>1</number>
</property> </property>
<property name="movable"> <property name="movable">
<bool>true</bool> <bool>true</bool>
@ -1029,7 +1029,7 @@ QToolButton:pressed {
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeType"> <property name="sizeType">
<enum>QSizePolicy::Minimum</enum> <enum>QSizePolicy::Maximum</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>