OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/gtk/status_bubble_gtk.h" | 5 #include "chrome/browser/gtk/status_bubble_gtk.h" |
6 | 6 |
7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 label_ = gtk_label_new(NULL); | 248 label_ = gtk_label_new(NULL); |
249 | 249 |
250 padding_ = gtk_alignment_new(0, 0, 1, 1); | 250 padding_ = gtk_alignment_new(0, 0, 1, 1); |
251 gtk_alignment_set_padding(GTK_ALIGNMENT(padding_), | 251 gtk_alignment_set_padding(GTK_ALIGNMENT(padding_), |
252 kInternalTopBottomPadding, kInternalTopBottomPadding, | 252 kInternalTopBottomPadding, kInternalTopBottomPadding, |
253 kInternalLeftRightPadding + (ltr ? 0 : kCornerSize), | 253 kInternalLeftRightPadding + (ltr ? 0 : kCornerSize), |
254 kInternalLeftRightPadding + (ltr ? kCornerSize : 0)); | 254 kInternalLeftRightPadding + (ltr ? kCornerSize : 0)); |
255 gtk_container_add(GTK_CONTAINER(padding_), label_); | 255 gtk_container_add(GTK_CONTAINER(padding_), label_); |
256 | 256 |
257 container_.Own(gtk_event_box_new()); | 257 container_.Own(gtk_event_box_new()); |
| 258 gtk_widget_set_no_show_all(container_.get(), TRUE); |
258 gtk_util::ActAsRoundedWindow( | 259 gtk_util::ActAsRoundedWindow( |
259 container_.get(), gtk_util::kGdkWhite, kCornerSize, | 260 container_.get(), gtk_util::kGdkWhite, kCornerSize, |
260 gtk_util::ROUNDED_TOP_RIGHT, | 261 gtk_util::ROUNDED_TOP_RIGHT, |
261 gtk_util::BORDER_TOP | gtk_util::BORDER_RIGHT); | 262 gtk_util::BORDER_TOP | gtk_util::BORDER_RIGHT); |
262 gtk_widget_set_name(container_.get(), "status-bubble"); | 263 gtk_widget_set_name(container_.get(), "status-bubble"); |
263 gtk_container_add(GTK_CONTAINER(container_.get()), padding_); | 264 gtk_container_add(GTK_CONTAINER(container_.get()), padding_); |
264 | 265 |
265 // We need to listen for mouse motion events, since a fast-moving pointer may | 266 // We need to listen for mouse motion events, since a fast-moving pointer may |
266 // enter our window without us getting any motion events on the browser near | 267 // enter our window without us getting any motion events on the browser near |
267 // enough for us to run away. | 268 // enough for us to run away. |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 return FALSE; | 356 return FALSE; |
356 } | 357 } |
357 | 358 |
358 void StatusBubbleGtk::AnimationEnded(const ui::Animation* animation) { | 359 void StatusBubbleGtk::AnimationEnded(const ui::Animation* animation) { |
359 UpdateLabelSizeRequest(); | 360 UpdateLabelSizeRequest(); |
360 } | 361 } |
361 | 362 |
362 void StatusBubbleGtk::AnimationProgressed(const ui::Animation* animation) { | 363 void StatusBubbleGtk::AnimationProgressed(const ui::Animation* animation) { |
363 UpdateLabelSizeRequest(); | 364 UpdateLabelSizeRequest(); |
364 } | 365 } |
OLD | NEW |