[haiku-commits] haiku: hrev51408 - src/apps/webpositive/tabview

  • From: jscipione@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 9 Sep 2017 22:27:04 +0200 (CEST)

hrev51408 adds 2 changesets to branch 'master'
old head: b8cfd96db10fc4341ffd3b552d28d95f716e895e
new head: 3b9755d72ff2ae92c23900167944db4f965d65ad
overview: 
http://cgit.haiku-os.org/haiku/log/?qt=range&q=3b9755d72ff2+%5Eb8cfd96db10f

----------------------------------------------------------------------------

ec7c3ff31146: Webpositive: Refactor
  
  ... to make variables available in outer scope,
  eliminate now redundant nested if and reorder condition
  variables to avoid function call in common case.
  
  all prep for next commit...

3b9755d72ff2: Webpositive: unset tool tip over tab close button
  
  Tool tip reads tab name or "New tab" for new tab, making it sometimes
  appear that the close button would produce a new tab instead. Removing
  the tooltip over the close button eliminates this confusion.
  
  An alternative suggested in hrev45298 was to make the tool tip say
  "Close tab" instead but some felt it unneccessary and so was reverted.
  
  "A tool-tip for the close buttons is completely unnecessary. The
  prevailing thought for items where the action is easy to grasp (or easy to
  grasp upon clicking the first time), is that a tool tip is not necessary."
  
  This method fixes the confusion w/o adding uneccessary clutter.

                                     [ John Scipione <jscipione@xxxxxxxxx> ]

----------------------------------------------------------------------------

1 file changed, 8 insertions(+), 8 deletions(-)
src/apps/webpositive/tabview/TabManager.cpp | 16 ++++++++--------

############################################################################

Commit:      ec7c3ff311460e111f02c11d30072220be46f4ea
URL:         http://cgit.haiku-os.org/haiku/commit/?id=ec7c3ff31146
Author:      John Scipione <jscipione@xxxxxxxxx>
Date:        Sat Sep  9 20:09:07 2017 UTC

Webpositive: Refactor

... to make variables available in outer scope,
eliminate now redundant nested if and reorder condition
variables to avoid function call in common case.

all prep for next commit...

----------------------------------------------------------------------------

diff --git a/src/apps/webpositive/tabview/TabManager.cpp 
b/src/apps/webpositive/tabview/TabManager.cpp
index dff37ca..cf249b3 100644
--- a/src/apps/webpositive/tabview/TabManager.cpp
+++ b/src/apps/webpositive/tabview/TabManager.cpp
@@ -566,13 +566,13 @@ void
 WebTabView::MouseMoved(BPoint where, uint32 transit,
        const BMessage* dragMessage)
 {
-       if (fController->CloseButtonsAvailable()) {
-               BRect closeRect = _CloseRectFrame(Frame());
-               bool overCloseRect = closeRect.Contains(where);
-               if (overCloseRect != fOverCloseRect) {
-                       fOverCloseRect = overCloseRect;
-                       ContainerView()->Invalidate(closeRect);
-               }
+       BRect closeRect = _CloseRectFrame(Frame());
+       bool overCloseRect = closeRect.Contains(where);
+
+       if (overCloseRect != fOverCloseRect
+               && fController->CloseButtonsAvailable()) {
+               fOverCloseRect = overCloseRect;
+               ContainerView()->Invalidate(closeRect);
        }
 
        // Set the tool tip

############################################################################

Revision:    hrev51408
Commit:      3b9755d72ff2ae92c23900167944db4f965d65ad
URL:         http://cgit.haiku-os.org/haiku/commit/?id=3b9755d72ff2
Author:      John Scipione <jscipione@xxxxxxxxx>
Date:        Sat Sep  9 20:20:37 2017 UTC

Webpositive: unset tool tip over tab close button

Tool tip reads tab name or "New tab" for new tab, making it sometimes
appear that the close button would produce a new tab instead. Removing
the tooltip over the close button eliminates this confusion.

An alternative suggested in hrev45298 was to make the tool tip say
"Close tab" instead but some felt it unneccessary and so was reverted.

"A tool-tip for the close buttons is completely unnecessary. The
prevailing thought for items where the action is easy to grasp (or easy to
grasp upon clicking the first time), is that a tool tip is not necessary."

This method fixes the confusion w/o adding uneccessary clutter.

----------------------------------------------------------------------------

diff --git a/src/apps/webpositive/tabview/TabManager.cpp 
b/src/apps/webpositive/tabview/TabManager.cpp
index cf249b3..07284b6 100644
--- a/src/apps/webpositive/tabview/TabManager.cpp
+++ b/src/apps/webpositive/tabview/TabManager.cpp
@@ -576,7 +576,7 @@ WebTabView::MouseMoved(BPoint where, uint32 transit,
        }
 
        // Set the tool tip
-       fController->SetToolTip(Label());
+       fController->SetToolTip(overCloseRect ? "" : Label());
 
        TabView::MouseMoved(where, transit, dragMessage);
 }


Other related posts:

  • » [haiku-commits] haiku: hrev51408 - src/apps/webpositive/tabview - jscipione