Commit 2fcb0fba authored by Waqar Ahmed's avatar Waqar Ahmed
Browse files

Make our sidebars smaller in height

Currently they are too big height wise with a lot of padding. Kill the
paddings, we want the editor taking most of the available space.
parent 278519aa
Pipeline #140125 passed with stage
in 2 minutes and 26 seconds
......@@ -285,6 +285,20 @@ Sidebar::Sidebar(KMultiTabBar::KMultiTabBarPosition pos, MainWindow *mainwin, QW
hide();
}
QSize Sidebar::minimumSizeHint() const
{
auto size = KMultiTabBar::sizeHint();
const auto fm = QFontMetrics(font());
const int height = fm.lineSpacing();
size.setHeight(height + 4);
return size;
}
QSize Sidebar::sizeHint() const
{
return minimumSizeHint();
}
void Sidebar::setSplitter(QSplitter *sp)
{
// if splitter was set before, disconnect handler for collapse
......
......@@ -176,6 +176,9 @@ public:
void setSplitter(QSplitter *sp);
QSize minimumSizeHint() const override;
QSize sizeHint() const override;
/**
* Monitor resizes using the mouse and update the last size accordingly.
* Only call this when the sidebar has siblings in the splitter (i.e. m_splitter->count() >= 2) to guarantee that resize handles exist
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment