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

Unified Diff: chrome/browser/gtk/tab_contents_container_gtk.cc

Issue 392007: gtk: Hide the status bubble when the mouse nears it. (Closed)
Patch Set: merge again Created 11 years, 1 month 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/gtk/status_bubble_gtk.cc ('k') | chrome/browser/status_bubble.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/tab_contents_container_gtk.cc
diff --git a/chrome/browser/gtk/tab_contents_container_gtk.cc b/chrome/browser/gtk/tab_contents_container_gtk.cc
index 942519497a83b1650668e4eb24fa616e0a06ac5a..a4fe973ae6383cad1ef90c6b338f2a8946a74eb9 100644
--- a/chrome/browser/gtk/tab_contents_container_gtk.cc
+++ b/chrome/browser/gtk/tab_contents_container_gtk.cc
@@ -188,26 +188,28 @@ void TabContentsContainerGtk::OnFixedSizeAllocate(
void TabContentsContainerGtk::OnSetFloatingPosition(
GtkFloatingContainer* floating_container, GtkAllocation* allocation,
TabContentsContainerGtk* tab_contents_container) {
- GtkWidget* status = tab_contents_container->status_bubble_->widget();
+ StatusBubbleGtk* status = tab_contents_container->status_bubble_;
// Look at the size request of the status bubble and tell the
// GtkFloatingContainer where we want it positioned.
GtkRequisition requisition;
- gtk_widget_size_request(status, &requisition);
+ gtk_widget_size_request(status->widget(), &requisition);
+
+ bool ltr = (l10n_util::GetTextDirection() == l10n_util::LEFT_TO_RIGHT);
GValue value = { 0, };
g_value_init(&value, G_TYPE_INT);
- if (l10n_util::GetTextDirection() == l10n_util::LEFT_TO_RIGHT)
+ if (ltr ^ status->flip_horizontally()) // Is it on the left?
g_value_set_int(&value, 0);
else
g_value_set_int(&value, allocation->width - requisition.width);
gtk_container_child_set_property(GTK_CONTAINER(floating_container),
- status, "x", &value);
+ status->widget(), "x", &value);
int child_y = std::max(
allocation->y + allocation->height - requisition.height, 0);
- g_value_set_int(&value, child_y);
+ g_value_set_int(&value, child_y + status->y_offset());
gtk_container_child_set_property(GTK_CONTAINER(floating_container),
- status, "y", &value);
+ status->widget(), "y", &value);
g_value_unset(&value);
}
« no previous file with comments | « chrome/browser/gtk/status_bubble_gtk.cc ('k') | chrome/browser/status_bubble.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698