1
0
mirror of https://invent.kde.org/system/dolphin synced 2024-07-07 10:51:45 +00:00

Align location bar splitter with view area splitter

https://commits.kde.org/breeze/18734eea941446d81624a505a18ceed132f0f480
has turned the splitter in our default Breeze style visible. This
made it very apparent that the two splitters visible when Dolphin
is in split view area mode are not aligned perfectly. The
computation is slightly off because the width of the splitter
itself was not taken into account. This commit fixes this.
This commit is contained in:
Felix Ernst 2023-11-08 16:32:51 +01:00 committed by Felix Ernst
parent 86c59879ec
commit 5ae081658e

View File

@ -45,7 +45,7 @@ void DolphinNavigatorsWidgetAction::adjustSpacing()
m_previousWindowWidth = qobject_cast<QWidget *>(parent())->window()->width();
auto viewGeometries = m_viewGeometriesHelper.viewGeometries();
const int widthOfSplitterPrimary = viewGeometries.globalXOfPrimary + viewGeometries.widthOfPrimary - viewGeometries.globalXOfNavigatorsWidget;
const QList<int> splitterSizes = {widthOfSplitterPrimary, m_splitter->width() - widthOfSplitterPrimary};
const QList<int> splitterSizes = {widthOfSplitterPrimary, m_splitter->width() - widthOfSplitterPrimary - m_splitter->handleWidth()};
m_splitter->setSizes(splitterSizes);
// primary side of m_splitter