[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    D6392: [Panel Config] Scrolling over size button increments size by 1 and shows current thickness
From:       Chris Holland <noreply () phabricator ! kde ! org>
Date:       2017-06-26 16:18:34
Message-ID: 20170626161833.68021.BF913E4CDE16DC99 () phabricator ! kde ! org
[Download RAW message or body]

Zren added a comment.


  Great idea about using a timer in the binding. I can probably keep the \
onThicknessChanged binding since it does change size when moved from left/right to \
top/bottom.  
  As far as I can tell, the `wheel.delta` is only using the hardcoded jumps of  ±120 \
(on click) (or 240 is scrolled fast enough). It's not triggered with a value of 0.  
  Scrolling "up" to increase the top panel size (expand downwards) feels a little \
weird, but it's probably better to be consistent with the left/right/bottom panels \
than to give it a special case when scrolling in reversed.

INLINE COMMENTS

> broulik wrote in SizeHandle.qml:123
> I don't know exactly how `MouseEventListener` behaves but in `MouseArea` you get a \
> ton of `onWheel` events for touchpads (which scroll pixel-precisely), potentially \
> causing you to making your panel enormous accidentally

That's a really good test case I hadn't considered. I wonder if `Qt::MouseButtons` \
`KDeclarativeWheelEvent.buttons` is pressed down in those events. I don't have a \
laptop/trackpad to test with so is there a utility to test trackpads with the mouse?

> broulik wrote in SizeHandle.qml:129
> Missing semicolon here and below, also can it ever get 0 anyway?

I shouldn't think so, but I can't confirm it. We don't *really* need to exit if it's \
0 anyways.

Btw, it looks like `QWheelEvent::delta()` isn't in the qt5 docs since it's \
deprecated. https://github.com/KDE/kdeclarative/blob/master/src/qmlcontrols/kquickcontrolsaddons/mouseeventlistener.cpp#L333
 http://doc.qt.io/qt-5/qwheelevent-members.html
https://github.com/qt/qtbase/blob/dev/src/gui/kernel/qevent.h#L202
https://github.com/qt/qtbase/blob/6bceb4a8a9292ce9f062a38d6fe143460b54370e/src/gui/kernel/qevent.cpp#L1003-L1008


REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D6392

To: Zren, #plasma
Cc: davidedmundson, broulik, plasma-devel, ZrenBot, progwolff, lesliezhai, \
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart, lukas


[Attachment #3 (unknown)]

<table><tr><td style="">Zren added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: \
right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: \
#F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: \
inline-block; border: 1px solid rgba(71,87,120,.2);" \
href="https://phabricator.kde.org/D6392" rel="noreferrer">View \
Revision</a></tr></table><br /><div><div><p>Great idea about using a timer in the \
binding. I can probably keep the onThicknessChanged binding since it does change size \
when moved from left/right to top/bottom.</p>

<p>As far as I can tell, the <tt style="background: #ebebeb; font-size: \
13px;">wheel.delta</tt> is only using the hardcoded jumps of  ±120 (on click) (or 240 \
is scrolled fast enough). It&#039;s not triggered with a value of 0.</p>

<p>Scrolling &quot;up&quot; to increase the top panel size (expand downwards) feels a \
little weird, but it&#039;s probably better to be consistent with the \
left/right/bottom panels than to give it a special case when scrolling in \
reversed.</p></div></div><br /><div><strong>INLINE COMMENTS</strong><div><div \
style="margin: 6px 0 12px 0;"><div style="border: 1px solid #C7CCD9; border-radius: \
3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; \
border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; \
background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; \
text-decoration: none;" href="https://phabricator.kde.org/D6392#inline-26336" \
rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: \
bold;">broulik</span> wrote in <span style="color: #4b4d51; font-weight: \
bold;">SizeHandle.qml:123</span></div> <div style="margin: 8px 0; padding: 0 12px; \
color: #74777D;"><p style="padding: 0; margin: 8px;">I don&#039;t know exactly how \
<tt style="background: #ebebeb; font-size: 13px;">MouseEventListener</tt> behaves but \
in <tt style="background: #ebebeb; font-size: 13px;">MouseArea</tt> you get a ton of \
<tt style="background: #ebebeb; font-size: 13px;">onWheel</tt> events for touchpads \
(which scroll pixel-precisely), potentially causing you to making your panel enormous \
accidentally</p></div></div> <div style="margin: 8px 0; padding: 0 12px;"><p \
style="padding: 0; margin: 8px;">That&#039;s a really good test case I hadn&#039;t \
considered. I wonder if <tt style="background: #ebebeb; font-size: \
13px;">Qt::MouseButtons</tt> <tt style="background: #ebebeb; font-size: \
13px;">KDeclarativeWheelEvent.buttons</tt> is pressed down in those events. I \
don&#039;t have a laptop/trackpad to test with so is there a utility to test \
trackpads with the mouse?</p></div></div><br /><div style="border: 1px solid #C7CCD9; \
border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: \
#e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: \
#74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: \
right; text-decoration: none;" href="https://phabricator.kde.org/D6392#inline-26338" \
rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: \
bold;">broulik</span> wrote in <span style="color: #4b4d51; font-weight: \
bold;">SizeHandle.qml:129</span></div> <div style="margin: 8px 0; padding: 0 12px; \
color: #74777D;"><p style="padding: 0; margin: 8px;">Missing semicolon here and \
below, also can it ever get 0 anyway?</p></div></div> <div style="margin: 8px 0; \
padding: 0 12px;"><p style="padding: 0; margin: 8px;">I shouldn&#039;t think so, but \
I can&#039;t confirm it. We don&#039;t *really* need to exit if it&#039;s 0 \
anyways.</p>

<p style="padding: 0; margin: 8px;">Btw, it looks like <tt style="background: \
#ebebeb; font-size: 13px;">QWheelEvent::delta()</tt> isn&#039;t in the qt5 docs since \
it&#039;s deprecated.<br /> <a \
href="https://github.com/KDE/kdeclarative/blob/master/src/qmlcontrols/kquickcontrolsaddons/mouseeventlistener.cpp#L333" \
class="remarkup-link" target="_blank" \
rel="noreferrer">https://github.com/KDE/kdeclarative/blob/master/src/qmlcontrols/kquickcontrolsaddons/mouseeventlistener.cpp#L333</a><br \
/> <a href="http://doc.qt.io/qt-5/qwheelevent-members.html" class="remarkup-link" \
target="_blank" rel="noreferrer">http://doc.qt.io/qt-5/qwheelevent-members.html</a><br \
/> <a href="https://github.com/qt/qtbase/blob/dev/src/gui/kernel/qevent.h#L202" \
class="remarkup-link" target="_blank" \
rel="noreferrer">https://github.com/qt/qtbase/blob/dev/src/gui/kernel/qevent.h#L202</a><br \
/> <a href="https://github.com/qt/qtbase/blob/6bceb4a8a9292ce9f062a38d6fe143460b54370e/src/gui/kernel/qevent.cpp#L1003-L1008" \
class="remarkup-link" target="_blank" \
rel="noreferrer">https://github.com/qt/qtbase/blob/6bceb4a8a9292ce9f062a38d6fe143460b5 \
4370e/src/gui/kernel/qevent.cpp#L1003-L1008</a></p></div></div></div></div></div><br \
/><div><strong>REPOSITORY</strong><div><div>R119 Plasma Desktop</div></div></div><br \
/><div><strong>REVISION DETAIL</strong><div><a \
href="https://phabricator.kde.org/D6392" \
rel="noreferrer">https://phabricator.kde.org/D6392</a></div></div><br \
/><div><strong>To: </strong>Zren, Plasma<br /><strong>Cc: </strong>davidedmundson, \
broulik, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, \
abetts, sebas, apol, mart, lukas<br /></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic