summaryrefslogtreecommitdiffstats
path: root/ui/oak
diff options
context:
space:
mode:
authorjamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-27 01:55:12 +0000
committerjamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-27 01:55:12 +0000
commit128fd37305cffa385a532cd1b48f5e3f9dfe2419 (patch)
tree6305ced78583f3328b5f24a4557dc3583ab11f9f /ui/oak
parentca5910757f5f0bfb070058ab168e2327f4cd6e4e (diff)
downloadchromium_src-128fd37305cffa385a532cd1b48f5e3f9dfe2419.zip
chromium_src-128fd37305cffa385a532cd1b48f5e3f9dfe2419.tar.gz
chromium_src-128fd37305cffa385a532cd1b48f5e3f9dfe2419.tar.bz2
Ash: Allow window resize to edge of launcher
Windows couldn't be positioned flush with the top edge of the launcher because we were reserving 2 pixels above the launcher to allow the window resize handles to be clicked. When combined with the grid for window sizes this meant windows had to sit 16 pixels above the launcher. I changed the hit test override code to take gfx::Insets so we can have a special hit test inset just for the top of the launcher and status area windows, which allows the windows to sit flush and keeps the resize handle clickable. BUG=119970 TEST=manual R=sky@chromium.org Review URL: http://codereview.chromium.org/9855031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129094 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/oak')
-rw-r--r--ui/oak/oak_aura_window_display.cc16
-rw-r--r--ui/oak/oak_pretty_print.cc6
-rw-r--r--ui/oak/oak_pretty_print.h3
3 files changed, 17 insertions, 8 deletions
diff --git a/ui/oak/oak_aura_window_display.cc b/ui/oak/oak_aura_window_display.cc
index fce9406..a6e0fbe0 100644
--- a/ui/oak/oak_aura_window_display.cc
+++ b/ui/oak/oak_aura_window_display.cc
@@ -34,7 +34,8 @@ ROW_TRANSIENTPARENT,
ROW_USERDATA,
ROW_IGNOREEVENTS,
ROW_CANFOCUS,
-ROW_HITTESTBOUNDSOVERRIDE,
+ROW_HITTESTBOUNDSOVERRIDEOUTER,
+ROW_HITTESTBOUNDSOVERRIDEINNER,
ROW_COUNT
};
@@ -141,13 +142,12 @@ string16 OakAuraWindowDisplay::GetText(int row, int column_id) {
window_->CanReceiveEvents());
case ROW_CANFOCUS:
return PropertyWithBool("Can Focus: ", window_->CanFocus());
- case ROW_HITTESTBOUNDSOVERRIDE: {
- int outer, inner;
- window_->GetHitTestBoundsOverride(&outer, &inner);
- return ASCIIToUTF16(
- base::StringPrintf("Hit test bounds override: outer %d, inner %d",
- outer, inner));
- }
+ case ROW_HITTESTBOUNDSOVERRIDEOUTER:
+ return PropertyWithInsets("Hit test bounds override outer: ",
+ window_->hit_test_bounds_override_outer());
+ case ROW_HITTESTBOUNDSOVERRIDEINNER:
+ return PropertyWithInsets("Hit test bounds override inner: ",
+ window_->hit_test_bounds_override_inner());
default:
NOTREACHED();
break;
diff --git a/ui/oak/oak_pretty_print.cc b/ui/oak/oak_pretty_print.cc
index c9c5b30..3b5cdb0 100644
--- a/ui/oak/oak_pretty_print.cc
+++ b/ui/oak/oak_pretty_print.cc
@@ -8,6 +8,7 @@
#include "base/utf_string_conversions.h"
#include "base/string_number_conversions.h"
#include "base/stringprintf.h"
+#include "ui/gfx/insets.h"
#include "ui/gfx/rect.h"
namespace oak {
@@ -33,5 +34,10 @@ string16 PropertyWithBounds(const std::string& prefix,
return ASCIIToUTF16(prefix + bounds.ToString());
}
+string16 PropertyWithInsets(const std::string& prefix,
+ const gfx::Insets& insets) {
+ return ASCIIToUTF16(prefix + insets.ToString());
+}
+
} // namespace internal
} // namespace oak
diff --git a/ui/oak/oak_pretty_print.h b/ui/oak/oak_pretty_print.h
index b99cd23..6d753bc 100644
--- a/ui/oak/oak_pretty_print.h
+++ b/ui/oak/oak_pretty_print.h
@@ -5,6 +5,7 @@
#include "base/string16.h"
namespace gfx {
+class Insets;
class Rect;
}
@@ -17,6 +18,8 @@ string16 PropertyWithInteger(const std::string& prefix, int value);
string16 PropertyWithVoidStar(const std::string& prefix, void* ptr);
string16 PropertyWithBool(const std::string& prefix, bool value);
string16 PropertyWithBounds(const std::string& prefix, const gfx::Rect& bounds);
+string16 PropertyWithInsets(const std::string& prefix,
+ const gfx::Insets& insets);
} // namespace internal
} // namespace oak