Skip to content

Commit

Permalink
WebPositive close x fixes.
Browse files Browse the repository at this point in the history
* Remove the Close tab and Close find bar tooltips.
* Offset the x again.
* Add some comments.
  • Loading branch information
jscipione committed Feb 21, 2013
1 parent 52266c1 commit fff103f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
3 changes: 1 addition & 2 deletions src/apps/webpositive/BrowserWindow.cpp
Expand Up @@ -271,6 +271,7 @@ class CloseButton : public BButton {
| BControlLook::B_BLEND_FRAME);
be_control_look->DrawButtonBackground(this, frame,
updateRect, base, BControlLook::B_ACTIVATED);
closeRect.OffsetBy(1, 1);
tint *= 1.2;
} else {
SetHighColor(base);
Expand Down Expand Up @@ -502,8 +503,6 @@ BrowserWindow::BrowserWindow(BRect frame, SettingsMessage* appSettings,

// Find group
fFindCloseButton = new CloseButton(new BMessage(EDIT_HIDE_FIND_GROUP));
fFindCloseButton->SetToolTip(B_TRANSLATE_COMMENT("Close find bar",
"find bar close button tooltip"));
fFindTextControl = new BTextControl("find", B_TRANSLATE("Find:"), "",
new BMessage(EDIT_FIND_NEXT));
fFindTextControl->SetModificationMessage(new BMessage(FIND_TEXT_CHANGED));
Expand Down
14 changes: 7 additions & 7 deletions src/apps/webpositive/tabview/TabManager.cpp
Expand Up @@ -584,13 +584,10 @@ WebTabView::MouseMoved(BPoint where, uint32 transit,
fOverCloseRect = overCloseRect;
ContainerView()->Invalidate(closeRect);
}
// Set the Tooltip
if (overCloseRect)
fController->SetToolTip(B_TRANSLATE("Close tab"));
else
fController->SetToolTip(Label());
} else
fController->SetToolTip(Label());
}

// Set the tool tip
fController->SetToolTip(Label());

TabView::MouseMoved(where, transit, dragMessage);
}
Expand Down Expand Up @@ -640,15 +637,18 @@ void WebTabView::_DrawCloseButton(BView* owner, BRect& frame,
tint *= 1.2;

if (fClicked && fOverCloseRect) {
// Draw the button frame
BRect buttonRect(closeRect.InsetByCopy(-4, -4));
be_control_look->DrawButtonFrame(owner, buttonRect, updateRect,
base, base,
BControlLook::B_ACTIVATED | BControlLook::B_BLEND_FRAME);
be_control_look->DrawButtonBackground(owner, buttonRect, updateRect,
base, BControlLook::B_ACTIVATED);
closeRect.OffsetBy(1, 1);
tint *= 1.2;
}

// Draw the ×
base = tint_color(base, tint);
owner->SetHighColor(base);
owner->SetPenSize(2);
Expand Down

2 comments on commit fff103f

@ASoftwareHatingFurry
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jscipione - since you're working on this, have you considered perhaps moving the close icon to the left side? This would be far more consistent with Haiku, especially if the close icon for Haiku's notification window were to be moved to the left also.

I made a thread on the forum a few days ago, where I outline some of the ways the favicon could be handled: http://www.haiku-os.org/community/forum/haiku_95_close_icon_problem_webpositive_notifications

@jscipione
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I appreciate that you have taken the time to express your ideas but please don't comment on github since the discussion is likely to be lost and seen by few people and is just not the right place for these kinds of discussions. The Haiku project provides this github repo as a convenient place to view the source and so that people can fork the repo and share their changes, it is not intended to be used for discussion.

Since you started this thread in the forums I'll reply there, although the haiku mailing list is probably a better place for this kind of discussion as the forums aren't viewed by many developers.

Please sign in to comment.