[prev in list] [next in list] [prev in thread] [next in thread]
List: kfm-devel
Subject: Re: consistency patch: zooming, wheel mouse
From: "Aaron J. Seigo" <aseigo () kde ! org>
Date: 2003-12-09 0:02:46
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Monday 08 December 2003 04:52, David Faure wrote:
> On Monday 08 December 2003 23:33, Aaron J. Seigo wrote:
> > hi...
> >
> > since shift+wheel zooms in html mode, a user asked me today if the same
> > worked in file management mode. when i said, "no" they asked "why?". i
> > didn't have an answer, so instead i made a patch.
>
> Cool - although I feel that it should be ctrl+wheel everywhere....
> (kview uses ctrl+wheel, and to make it makes more sense:
> shift amplifies a given action (e.g. a->A), whereas ctrl gives it a
> totally different meaning).
yeah, i completely agree... unfortunately, as you note, we've got the two
reversed. =/
QTextEdit gets it right, from the header docu: Ctrl+Wheel Zoom the text
so.. attached are patches for khtml (one liner) and (updated) icon view ... i
suppose for the next release we should give all apps w/zoom the ability to do
Ctrl+Wheel ... hrm... it would be cool if KAction could standardize things
like mouse wheel meanings...
ok to commit?
- --
Aaron J. Seigo
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43
"Never weary, never dispair, never give in" - Winston Churchill
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
iD8DBQE/1REq1rcusafx20MRAuhKAJ9Cd9/0XrqnTkqw+q2dnh4wzM+GOwCfdUBG
9XDVwZUMv7xJbBzODvPtZR8=
=/+Yv
-----END PGP SIGNATURE-----
["khtml_zoom_with_control.diff" (text/x-diff)]
Index: khtmlview.cpp
===================================================================
RCS file: /home/kde/kdelibs/khtml/khtmlview.cpp,v
retrieving revision 1.596
diff -u -3 -d -p -r1.596 khtmlview.cpp
--- khtmlview.cpp 5 Dec 2003 18:43:45 -0000 1.596
+++ khtmlview.cpp 9 Dec 2003 00:23:13 -0000
@@ -1971,7 +1971,7 @@ void KHTMLView::setIgnoreWheelEvents( bo
void KHTMLView::viewportWheelEvent(QWheelEvent* e)
{
- if ( ( e->state() & ShiftButton ) == ShiftButton )
+ if ( ( e->state() & ShiftButton ) == ControlButton )
{
emit zoomView( - e->delta() );
e->accept();
["konqi_iconview_zoom.diff" (text/x-diff)]
Index: libkonq/konq_iconviewwidget.cc
===================================================================
RCS file: /home/kde/kdebase/libkonq/konq_iconviewwidget.cc,v
retrieving revision 1.267
diff -u -3 -d -p -r1.267 konq_iconviewwidget.cc
--- libkonq/konq_iconviewwidget.cc 5 Nov 2003 01:27:49 -0000 1.267
+++ libkonq/konq_iconviewwidget.cc 9 Dec 2003 00:26:13 -0000
@@ -1391,6 +1391,25 @@ void KonqIconViewWidget::doubleClickTime
d->renameItem= false;
}
+void KonqIconViewWidget::wheelEvent(QWheelEvent* e)
+{
+ if (e->state() == ControlButton)
+ {
+ if (e->delta() >= 0)
+ {
+ emit incIconSize();
+ }
+ else
+ {
+ emit decIconSize();
+ }
+ e->accept();
+ return;
+ }
+
+ KIconView::wheelEvent(e);
+}
+
void KonqIconViewWidget::mousePressChangeValue()
{
//kdDebug(1203) << "KonqIconViewWidget::contentsMousePressEvent" << endl;
Index: libkonq/konq_iconviewwidget.h
===================================================================
RCS file: /home/kde/kdebase/libkonq/konq_iconviewwidget.h,v
retrieving revision 1.102
diff -u -3 -d -p -r1.102 konq_iconviewwidget.h
--- libkonq/konq_iconviewwidget.h 5 Oct 2003 12:10:22 -0000 1.102
+++ libkonq/konq_iconviewwidget.h 9 Dec 2003 00:26:13 -0000
@@ -235,6 +235,9 @@ signals:
void dropped();
void imagePreviewFinished();
+ void incIconSize();
+ void decIconSize();
+
protected slots:
virtual void slotDropped( QDropEvent *e, const QValueList<QIconDragItem> & );
@@ -276,6 +279,7 @@ protected:
virtual void contentsMouseReleaseEvent ( QMouseEvent * e );
virtual void contentsMouseMoveEvent( QMouseEvent *e );
virtual void backgroundPixmapChange( const QPixmap & );
+ virtual void wheelEvent( QWheelEvent* );
void readAnimatedIconsConfig();
void mousePressChangeValue();
Index: konqueror/iconview/konq_iconview.cc
===================================================================
RCS file: /home/kde/kdebase/konqueror/iconview/konq_iconview.cc,v
retrieving revision 1.452
diff -u -3 -d -p -r1.452 konq_iconview.cc
--- konqueror/iconview/konq_iconview.cc 23 Oct 2003 23:51:43 -0000 1.452
+++ konqueror/iconview/konq_iconview.cc 9 Dec 2003 00:26:17 -0000
@@ -175,6 +175,12 @@ KonqKfmIconView::KonqKfmIconView( QWidge
connect( m_pIconView, SIGNAL(imagePreviewFinished()),
this, SLOT(slotRenderingFinished()));
+ // connect up the icon inc/dec signals
+ connect( m_pIconView, SIGNAL(incIconSize()),
+ this, SLOT(slotIncIconSize()));
+ connect( m_pIconView, SIGNAL(decIconSize()),
+ this, SLOT(slotDecIconSize()));
+
// pass signals to the extension
connect( m_pIconView, SIGNAL( enableAction( const char *, bool ) ),
m_extension, SIGNAL( enableAction( const char *, bool ) ) );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic