mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56:34 +01:00
[AutoScroll] Add scrolling icons (from Oxygen cursor theme)
Also scroll timer interval is now 10 msecs, so scrolling will be a little faster.
This commit is contained in:
parent
ed99915bff
commit
7323fb1cad
@ -1,4 +1,7 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/autoscroll">
|
<qresource prefix="/autoscroll">
|
||||||
|
<file>data/scroll_all.png</file>
|
||||||
|
<file>data/scroll_horizontal.png</file>
|
||||||
|
<file>data/scroll_vertical.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
@ -32,8 +32,8 @@ AutoScroller::AutoScroller(const QString &settings, QObject* parent)
|
|||||||
Q_UNUSED(settings)
|
Q_UNUSED(settings)
|
||||||
|
|
||||||
m_indicator = new QLabel;
|
m_indicator = new QLabel;
|
||||||
m_indicator->resize(30, 30);
|
m_indicator->resize(32, 32);
|
||||||
m_indicator->setStyleSheet("QLabel{background-color: red;}");
|
m_indicator->setContentsMargins(0, 0, 0, 0);
|
||||||
m_indicator->installEventFilter(this);
|
m_indicator->installEventFilter(this);
|
||||||
|
|
||||||
m_frameScroller = new FrameScroller(this);
|
m_frameScroller = new FrameScroller(this);
|
||||||
@ -147,6 +147,16 @@ bool AutoScroller::showIndicator(WebView* view, const QPoint &pos)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (vertical && horizontal) {
|
||||||
|
m_indicator->setPixmap(QPixmap(":/autoscroll/data/scroll_all.png"));
|
||||||
|
}
|
||||||
|
else if (vertical) {
|
||||||
|
m_indicator->setPixmap(QPixmap(":/autoscroll/data/scroll_vertical.png"));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
m_indicator->setPixmap(QPixmap(":/autoscroll/data/scroll_horizontal.png"));
|
||||||
|
}
|
||||||
|
|
||||||
m_view = view;
|
m_view = view;
|
||||||
|
|
||||||
QPoint p;
|
QPoint p;
|
||||||
|
@ -35,7 +35,7 @@ PluginSpec AutoScrollPlugin::pluginSpec()
|
|||||||
spec.name = "AutoScroll";
|
spec.name = "AutoScroll";
|
||||||
spec.info = "AutoScroll plugin";
|
spec.info = "AutoScroll plugin";
|
||||||
spec.description = "Provides support for autoscroll with middle mouse button";
|
spec.description = "Provides support for autoscroll with middle mouse button";
|
||||||
spec.version = "0.1.0";
|
spec.version = "0.1.1";
|
||||||
spec.author = "David Rosca <nowrep@gmail.com>";
|
spec.author = "David Rosca <nowrep@gmail.com>";
|
||||||
spec.icon = QPixmap(":/autoscroll/data/icon.png");
|
spec.icon = QPixmap(":/autoscroll/data/icon.png");
|
||||||
spec.hasSettings = false;
|
spec.hasSettings = false;
|
||||||
|
BIN
src/plugins/AutoScroll/data/scroll_all.png
Normal file
BIN
src/plugins/AutoScroll/data/scroll_all.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
BIN
src/plugins/AutoScroll/data/scroll_horizontal.png
Normal file
BIN
src/plugins/AutoScroll/data/scroll_horizontal.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
BIN
src/plugins/AutoScroll/data/scroll_vertical.png
Normal file
BIN
src/plugins/AutoScroll/data/scroll_vertical.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
@ -28,7 +28,7 @@ FrameScroller::FrameScroller(QObject* parent)
|
|||||||
, m_lengthY(0)
|
, m_lengthY(0)
|
||||||
{
|
{
|
||||||
m_timer = new QTimer(this);
|
m_timer = new QTimer(this);
|
||||||
m_timer->setInterval(20);
|
m_timer->setInterval(10);
|
||||||
connect(m_timer, SIGNAL(timeout()), this, SLOT(scrollStep()));
|
connect(m_timer, SIGNAL(timeout()), this, SLOT(scrollStep()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user