Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Unified Diff: chrome/browser/views/status_bubble_views.cc

Issue 113671: Fixes the problem of the status bubble obscuring the download shelf.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/views/status_bubble_views.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/status_bubble_views.cc
===================================================================
--- chrome/browser/views/status_bubble_views.cc (revision 17014)
+++ chrome/browser/views/status_bubble_views.cc (working copy)
@@ -458,7 +458,8 @@
popup_(NULL),
opacity_(0),
frame_(frame),
- view_(NULL) {
+ view_(NULL),
+ download_shelf_is_visible_(false) {
}
StatusBubbleViews::~StatusBubbleViews() {
@@ -554,6 +555,10 @@
}
}
+void StatusBubbleViews::UpdateDownloadShelfVisibility(bool visible) {
+ download_shelf_is_visible_ = visible;
+}
+
void StatusBubbleViews::AvoidMouse() {
// Our status bubble is located in screen coordinates, so we should get
// those rather than attempting to reverse decode the web contents
@@ -606,7 +611,8 @@
view_->SetStyle(StatusView::STYLE_STANDARD);
}
- // Check if the bubble sticks out from the monitor.
+ // Check if the bubble sticks out from the monitor or will obscure
+ // download shelf.
#if defined(OS_WIN)
MONITORINFO monitor_info;
monitor_info.cbSize = sizeof(monitor_info);
@@ -619,7 +625,9 @@
#endif
const int bubble_bottom_y = top_left.y() + position_.y() + size_.height();
- if (bubble_bottom_y + offset > monitor_rect.height()) {
+ if (bubble_bottom_y + offset > monitor_rect.height() ||
+ (download_shelf_is_visible_ &&
+ view_->GetStyle() == StatusView::STYLE_FLOATING)) {
// The offset is still too large. Move the bubble to the right and reset
// Y offset_ to zero.
view_->SetStyle(StatusView::STYLE_STANDARD_RIGHT);
« no previous file with comments | « chrome/browser/views/status_bubble_views.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698