mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 01:40:02 +00:00
Adapt to frame change in Breeze
Reduce margins in some places, make the dolphinstatusbar use a QStatusBar style, and mark the kitemlistcontainer as no frame
This commit is contained in:
parent
96c602605d
commit
659eafd796
|
@ -33,8 +33,7 @@ public:
|
||||||
|
|
||||||
QSize minimumSizeHint() const override
|
QSize minimumSizeHint() const override
|
||||||
{
|
{
|
||||||
const int border = style()->pixelMetric(QStyle::PM_DockWidgetTitleBarButtonMargin);
|
return QSize(0, 0);
|
||||||
return QSize(border, border);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QSize sizeHint() const override
|
QSize sizeHint() const override
|
||||||
|
|
|
@ -2139,6 +2139,7 @@ void DolphinMainWindow::setupDockWidgets()
|
||||||
DolphinDockWidget *terminalDock = new DolphinDockWidget(i18nc("@title:window Shell terminal", "Terminal"));
|
DolphinDockWidget *terminalDock = new DolphinDockWidget(i18nc("@title:window Shell terminal", "Terminal"));
|
||||||
terminalDock->setLocked(lock);
|
terminalDock->setLocked(lock);
|
||||||
terminalDock->setObjectName(QStringLiteral("terminalDock"));
|
terminalDock->setObjectName(QStringLiteral("terminalDock"));
|
||||||
|
terminalDock->setContentsMargins(0, 0, 0, 0);
|
||||||
m_terminalPanel = new TerminalPanel(terminalDock);
|
m_terminalPanel = new TerminalPanel(terminalDock);
|
||||||
m_terminalPanel->setCustomContextMenuActions({lockLayoutAction});
|
m_terminalPanel->setCustomContextMenuActions({lockLayoutAction});
|
||||||
terminalDock->setWidget(m_terminalPanel);
|
terminalDock->setWidget(m_terminalPanel);
|
||||||
|
|
|
@ -19,8 +19,10 @@
|
||||||
#include <QHelpEvent>
|
#include <QHelpEvent>
|
||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
|
#include <QPainter>
|
||||||
#include <QProgressBar>
|
#include <QProgressBar>
|
||||||
#include <QSlider>
|
#include <QSlider>
|
||||||
|
#include <QStyleOption>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QToolButton>
|
#include <QToolButton>
|
||||||
|
|
||||||
|
@ -44,6 +46,8 @@ DolphinStatusBar::DolphinStatusBar(QWidget *parent)
|
||||||
, m_delayUpdateTimer(nullptr)
|
, m_delayUpdateTimer(nullptr)
|
||||||
, m_textTimestamp()
|
, m_textTimestamp()
|
||||||
{
|
{
|
||||||
|
setContentsMargins(4, 0, 4, 0);
|
||||||
|
|
||||||
// Initialize text label
|
// Initialize text label
|
||||||
m_label = new KSqueezedTextLabel(m_text, this);
|
m_label = new KSqueezedTextLabel(m_text, this);
|
||||||
m_label->setWordWrap(true);
|
m_label->setWordWrap(true);
|
||||||
|
@ -336,4 +340,12 @@ void DolphinStatusBar::setExtensionsVisible(bool visible)
|
||||||
m_zoomLabel->setVisible(showZoomSlider);
|
m_zoomLabel->setVisible(showZoomSlider);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DolphinStatusBar::paintEvent(QPaintEvent *paintEvent)
|
||||||
|
{
|
||||||
|
QPainter p(this);
|
||||||
|
QStyleOption opt;
|
||||||
|
opt.initFrom(this);
|
||||||
|
style()->drawPrimitive(QStyle::PE_PanelStatusBar, &opt, &p, this);
|
||||||
|
}
|
||||||
|
|
||||||
#include "moc_dolphinstatusbar.cpp"
|
#include "moc_dolphinstatusbar.cpp"
|
||||||
|
|
|
@ -94,6 +94,7 @@ Q_SIGNALS:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void contextMenuEvent(QContextMenuEvent *event) override;
|
void contextMenuEvent(QContextMenuEvent *event) override;
|
||||||
|
void paintEvent(QPaintEvent *paintEvent) override;
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void showZoomSliderToolTip(int zoomLevel);
|
void showZoomSliderToolTip(int zoomLevel);
|
||||||
|
|
Loading…
Reference in a new issue