mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-24 04:36:34 +01:00
[ComboTabBar] Double click on scroll buttons will scroll to end/start
This commit is contained in:
parent
cf87a9895e
commit
0038fd6cb6
@ -1119,12 +1119,14 @@ TabBarScrollWidget::TabBarScrollWidget(QTabBar* tabBar, QWidget* parent)
|
||||
m_leftScrollButton->setObjectName("tabbar-button-left");
|
||||
connect(m_leftScrollButton, SIGNAL(pressed()), this, SLOT(scrollStart()));
|
||||
connect(m_leftScrollButton, SIGNAL(released()), this, SLOT(scrollStop()));
|
||||
connect(m_leftScrollButton, SIGNAL(doubleClicked()), this, SLOT(scrollToLeftEdge()));
|
||||
|
||||
m_rightScrollButton = new ToolButton(this);
|
||||
m_rightScrollButton->setAutoRaise(true);
|
||||
m_rightScrollButton->setObjectName("tabbar-button-right");
|
||||
connect(m_rightScrollButton, SIGNAL(pressed()), this, SLOT(scrollStart()));
|
||||
connect(m_rightScrollButton, SIGNAL(released()), this, SLOT(scrollStop()));
|
||||
connect(m_rightScrollButton, SIGNAL(doubleClicked()), this, SLOT(scrollToRightEdge()));
|
||||
|
||||
m_leftLayout = new QHBoxLayout;
|
||||
m_leftLayout->setSpacing(0);
|
||||
|
@ -150,6 +150,13 @@ void ToolButton::mouseReleaseEvent(QMouseEvent* e)
|
||||
setDown(false);
|
||||
}
|
||||
|
||||
void ToolButton::mouseDoubleClickEvent(QMouseEvent* e)
|
||||
{
|
||||
QToolButton::mouseDoubleClickEvent(e);
|
||||
|
||||
emit doubleClicked();
|
||||
}
|
||||
|
||||
void ToolButton::showMenu()
|
||||
{
|
||||
if (!m_showMenuInside) {
|
||||
|
@ -60,6 +60,7 @@ public:
|
||||
signals:
|
||||
void middleMouseClicked();
|
||||
void controlClicked();
|
||||
void doubleClicked();
|
||||
|
||||
public slots:
|
||||
void showMenu();
|
||||
@ -67,6 +68,7 @@ public slots:
|
||||
protected:
|
||||
void mousePressEvent(QMouseEvent* e);
|
||||
void mouseReleaseEvent(QMouseEvent* e);
|
||||
void mouseDoubleClickEvent(QMouseEvent* e);
|
||||
|
||||
private:
|
||||
void paintEvent(QPaintEvent* e);
|
||||
|
Loading…
Reference in New Issue
Block a user