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

Side by Side Diff: ui/views/corewm/tooltip_aura.h

Issue 602313002: Fix Aura tooltip sizing and layout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | ui/views/corewm/tooltip_aura.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef UI_VIEWS_COREWM_TOOLTIP_AURA_H_ 5 #ifndef UI_VIEWS_COREWM_TOOLTIP_AURA_H_
6 #define UI_VIEWS_COREWM_TOOLTIP_AURA_H_ 6 #define UI_VIEWS_COREWM_TOOLTIP_AURA_H_
7 7
8 #include "ui/gfx/screen_type_delegate.h" 8 #include "ui/gfx/screen_type_delegate.h"
9 #include "ui/views/controls/label.h" 9 #include "ui/views/controls/label.h"
10 #include "ui/views/corewm/tooltip.h" 10 #include "ui/views/corewm/tooltip.h"
(...skipping 25 matching lines...) Expand all
36 int* width, 36 int* width,
37 int* line_count); 37 int* line_count);
38 38
39 private: 39 private:
40 // Returns the max width of the tooltip when shown at the specified location. 40 // Returns the max width of the tooltip when shown at the specified location.
41 int GetMaxWidth(const gfx::Point& location) const; 41 int GetMaxWidth(const gfx::Point& location) const;
42 42
43 // Adjusts the bounds given by the arguments to fit inside the desktop 43 // Adjusts the bounds given by the arguments to fit inside the desktop
44 // and applies the adjusted bounds to the label_. 44 // and applies the adjusted bounds to the label_.
45 void SetTooltipBounds(const gfx::Point& mouse_pos, 45 void SetTooltipBounds(const gfx::Point& mouse_pos,
46 int tooltip_width, 46 const gfx::Size& tooltip_size);
47 int tooltip_height);
48 47
49 // Destroys |widget_|. 48 // Destroys |widget_|.
50 void DestroyWidget(); 49 void DestroyWidget();
51 50
52 // Tooltip: 51 // Tooltip:
53 virtual void SetText(aura::Window* window, 52 virtual void SetText(aura::Window* window,
54 const base::string16& tooltip_text, 53 const base::string16& tooltip_text,
55 const gfx::Point& location) OVERRIDE; 54 const gfx::Point& location) OVERRIDE;
56 virtual void Show() OVERRIDE; 55 virtual void Show() OVERRIDE;
57 virtual void Hide() OVERRIDE; 56 virtual void Hide() OVERRIDE;
(...skipping 14 matching lines...) Expand all
72 // showing. 71 // showing.
73 aura::Window* tooltip_window_; 72 aura::Window* tooltip_window_;
74 73
75 DISALLOW_COPY_AND_ASSIGN(TooltipAura); 74 DISALLOW_COPY_AND_ASSIGN(TooltipAura);
76 }; 75 };
77 76
78 } // namespace corewm 77 } // namespace corewm
79 } // namespace views 78 } // namespace views
80 79
81 #endif // UI_VIEWS_COREWM_TOOLTIP_AURA_H_ 80 #endif // UI_VIEWS_COREWM_TOOLTIP_AURA_H_
OLDNEW
« no previous file with comments | « no previous file | ui/views/corewm/tooltip_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698