[Bug 147362] New: tool-tip for zoom indicator is below the screen if window is maximised

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 147362] New: tool-tip for zoom indicator is below the screen if window is maximised

Fabien-5
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=147362         
           Summary: tool-tip for zoom indicator is below the screen if
                    window is maximised
           Product: digikam
           Version: unspecified
          Platform: Ubuntu Packages
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: digikam-devel kde org
        ReportedBy: fabien.ubuntu gmail com


Version:           svn (using KDE KDE 3.5.4)
Installed from:    Ubuntu Packages
OS:                Linux

This applies for the main digikam window but also with lighttable.
The size/zoom indicator is at the bottom of the window.
If you put the mouse over it, you get size/zoom value.
But, if the window is maximised (and no taskbar), the tool-tip is displayed under it, so we can't see it :(
I think behavior should be like Konsole :
If there's enough place below, it's displayed under the button, otherwise, it's aboe.


I tried to have a look at Qlabel alignments, but I don't have enough knowledge in Qt/C++ to fix it...
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 147362] tool-tip for zoom indicator is below the screen if window is maximised

Gilles Caulier-4
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=147362         




------- Additional Comments From caulier.gilles gmail com  2007-06-29 17:56 -------
Fabien,

The widget to show the zoom tooltip is a dedicaced widget. Look here :

http://websvn.kde.org/branches/extragear/kde3/graphics/digikam/libs/widgets/common/dcursortracker.cpp?revision=670778&view=markup

Look in DTipTracker, there is a "setAlignment()" call to adapt accordinly with the position of text over the border of screen.

Gilles
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 147362] tool-tip for zoom indicator is below the screen if window is maximised

Fabien-5
In reply to this post by Fabien-5
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=147362         




------- Additional Comments From fabien.ubuntu gmail com  2007-07-02 14:48 -------
I tried to change from AlignTop to AlignBottom, but it doesn't change anything.
I'm afraid I won't be able to help more on this :(
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 147362] tool-tip for zoom indicator is below the screen if window is maximised

Gilles Caulier-4
In reply to this post by Fabien-5
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=147362         




------- Additional Comments From caulier.gilles gmail com  2007-07-02 15:00 -------
Fabien, (:=)))

Try to play with this line :

bool DCursorTracker::eventFilter(QObject *object, QEvent *e)
{
...
    move(event->globalPos().x() + 15, event->globalPos().y() + 15);

...and especially the "+15" offset used to move tooltip on X,Y...

You just need to adapt these values.

Gilles

Gilles
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 147362] tool-tip for zoom indicator is below the screen if window is maximised

Fabien-5
In reply to this post by Fabien-5
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=147362         




------- Additional Comments From fabien.ubuntu gmail com  2007-07-02 15:55 -------
:)
I didn't read the whole file, stupid I am...
I will do some tests.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 147362] tool-tip for zoom indicator is below the screen if window is maximised

Bugzilla from mikmach@wp.pl
In reply to this post by Fabien-5
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=147362         
mikmach wp pl changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
      everconfirmed|0                           |1



------- Additional Comments From mikmach wp pl  2007-07-02 18:10 -------
This is known problem.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 147362] tool-tip for zoom indicator is below the screen if window is maximised

Fabien-5
In reply to this post by Fabien-5
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=147362         




------- Additional Comments From fabien.ubuntu gmail com  2007-07-03 17:24 -------
Ok, so I did some tests and I changed the value so that the tool-tip is just above the pointer.
I tried to create a snapshot, but we can't see the pointer :(

It's much better like that in my opinion.

If it's ok for you, I'll commit the fix to svn.



Index: dcursortracker.cpp
===================================================================
--- dcursortracker.cpp  (revision 682745)
+++ dcursortracker.cpp  (working copy)
 @ -69,7 +69,7  @
                             (event->stateAfter() & LeftButton)))
             {
                 show();
-                move(event->globalPos().x() + 15, event->globalPos().y() + 15);
+                move(event->globalPos().x() + 15, event->globalPos().y() - 15);
             }
             else
             {
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 147362] tool-tip for zoom indicator is below the screen if window is maximised

Gilles Caulier-4
In reply to this post by Fabien-5
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=147362         




------- Additional Comments From caulier.gilles gmail com  2007-07-04 08:16 -------
Fabien this can be a fast fix for this problem. This widget is always on the bottom of windows.

But, i prefert an advanced fix which include something like QToolTip do : check the position of the widget over the screen and adapt X and Y offset accordinly to be always readable.

See below the code from Qt3.5.7. It have been extracted from method "void QTipManager::showTip()" of qtooltip.cpp C++ file. It resume exactly what we need to compute the offset and it simple to understand :

{
...

    int scr;
    if ( QApplication::desktop()->isVirtualDesktop() )
        scr = QApplication::desktop()->screenNumber( widget->mapToGlobal( pos ) );
    else
        scr = QApplication::desktop()->screenNumber( widget );

...

#ifdef Q_WS_MAC
    QRect screen = QApplication::desktop()->availableGeometry( scr );
#else
    QRect screen = QApplication::desktop()->screenGeometry( scr );
#endif

    QPoint p;

    p = widget->mapToGlobal( t->geometry.topLeft() );
   
    if ( p.y() < screen.y() )
        p.setY( screen.y() );
    if ( p.x() + label->width() > screen.x() + screen.width() )
        p.setX( screen.x() + screen.width() - label->width() );
    if ( p.x() < screen.x() )
        p.setX( screen.x() );
    if ( p.y() + label->height() > screen.y() + screen.height() )
        p.setY( screen.y() + screen.height() - label->height() );
    if ( label->text().length() )
        label->move( p );
...
}

"pos" is the current position of the mouse over the screen.
"scr" is a reference to the screen object.
"screen" is the screen rectangle. It include xinerama case.
"label" is the qtooltip label displayed by Qt over the widget.
"p" is the left/top point of the tip label to display adjusted over the screen.

You can adapt this code to DCursorTracker::eventFilter() method easily...

Gilles
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 147362] tool-tip for zoom indicator is below the screen if window is maximised

Gilles Caulier-4
In reply to this post by Fabien-5
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=147362         
caulier.gilles gmail com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From caulier.gilles gmail com  2007-07-21 21:23 -------
SVN commit 690669 by cgilles:

digikam from KDE3 branch : fix cursor tracker tooltip position to be always visible with zoom slider.
BUG: 147362


 M  +1 -1      dcursortracker.cpp  


--- branches/extragear/kde3/graphics/digikam/libs/widgets/common/dcursortracker.cpp #690668:690669
 @ -69,7 +69,7  @
                             (event->stateAfter() & LeftButton)))
             {
                 show();
-                move(event->globalPos().x() + 15, event->globalPos().y() + 15);
+                move(event->globalPos().x() + 15, event->globalPos().y() - 15);
             }
             else
             {
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 147362] tool-tip for zoom indicator is below the screen if window is maximised

Gilles Caulier-4
In reply to this post by Fabien-5
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=147362         




------- Additional Comments From caulier.gilles gmail com  2007-07-21 21:24 -------
SVN commit 690670 by cgilles:

digiKam from trunk (KDE4): backport KDE3 fix.
CCBUGS: 147362


 M  +1 -1      dcursortracker.cpp  


--- trunk/extragear/graphics/digikam/libs/widgets/common/dcursortracker.cpp #690669:690670
 @ -72,7 +72,7  @
                             (event->buttons() & Qt::LeftButton)))
             {
                 show();
-                move(event->globalPos().x() + 15, event->globalPos().y() + 15);
+                move(event->globalPos().x() + 15, event->globalPos().y() - 15);
             }
             else
             {
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel