summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/tab_contents_container_gtk.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/gtk/tab_contents_container_gtk.cc')
-rw-r--r--chrome/browser/gtk/tab_contents_container_gtk.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/chrome/browser/gtk/tab_contents_container_gtk.cc b/chrome/browser/gtk/tab_contents_container_gtk.cc
index 9425194..a4fe973 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);
}