summaryrefslogtreecommitdiffstats
path: root/ash
diff options
context:
space:
mode:
authorflackr@chromium.org <flackr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-01 13:26:17 +0000
committerflackr@chromium.org <flackr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-01 13:26:17 +0000
commit30a718b5ead20a1b7390b7a9c0e292c0c486b979 (patch)
treed091095a643c101cc1fc7037bd38163f06d6a454 /ash
parentcaa573d27c4bae2fe0fe24ba7e1ef2c0f5043ae0 (diff)
downloadchromium_src-30a718b5ead20a1b7390b7a9c0e292c0c486b979.zip
chromium_src-30a718b5ead20a1b7390b7a9c0e292c0c486b979.tar.gz
chromium_src-30a718b5ead20a1b7390b7a9c0e292c0c486b979.tar.bz2
Add minimize button assets for panel windows.
BUG=172275 TEST=Open a panel window, minimize button next to close button has the minimize button asset. Review URL: https://codereview.chromium.org/12313153 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185534 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r--ash/resources/ash_resources.grd3
-rw-r--r--ash/resources/default_100_percent/common/window_minimize_short_hover.pngbin0 -> 429 bytes
-rw-r--r--ash/resources/default_100_percent/common/window_minimize_short_normal.pngbin0 -> 375 bytes
-rw-r--r--ash/resources/default_100_percent/common/window_minimize_short_pressed.pngbin0 -> 596 bytes
-rw-r--r--ash/resources/default_200_percent/common/window_minimize_short_hover.pngbin0 -> 785 bytes
-rw-r--r--ash/resources/default_200_percent/common/window_minimize_short_normal.pngbin0 -> 623 bytes
-rw-r--r--ash/resources/default_200_percent/common/window_minimize_short_pressed.pngbin0 -> 1046 bytes
-rw-r--r--ash/wm/frame_painter.cc36
8 files changed, 25 insertions, 14 deletions
diff --git a/ash/resources/ash_resources.grd b/ash/resources/ash_resources.grd
index d6d74aa..07c4127 100644
--- a/ash/resources/ash_resources.grd
+++ b/ash/resources/ash_resources.grd
@@ -256,6 +256,9 @@
<structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_MAXIMIZED_RESTORE2_H" file="common/window_size_short_black_hover.png" />
<structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_MAXIMIZED_RESTORE2_P" file="common/window_size_short_black_pressed.png" />
+ <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_MINIMIZE_SHORT" file="common/window_minimize_short_normal.png" />
+ <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_MINIMIZE_SHORT_H" file="common/window_minimize_short_hover.png" />
+ <structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_MINIMIZE_SHORT_P" file="common/window_minimize_short_pressed.png" />
<structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_POSITION_LEFT" file="common/window_position_left_normal.png" />
<structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_POSITION_LEFT_H" file="common/window_position_left_hover.png" />
<structure type="chrome_scaled_image" name="IDR_AURA_WINDOW_POSITION_LEFT_P" file="common/window_position_left_pressed.png" />
diff --git a/ash/resources/default_100_percent/common/window_minimize_short_hover.png b/ash/resources/default_100_percent/common/window_minimize_short_hover.png
new file mode 100644
index 0000000..379e7296
--- /dev/null
+++ b/ash/resources/default_100_percent/common/window_minimize_short_hover.png
Binary files differ
diff --git a/ash/resources/default_100_percent/common/window_minimize_short_normal.png b/ash/resources/default_100_percent/common/window_minimize_short_normal.png
new file mode 100644
index 0000000..2275079
--- /dev/null
+++ b/ash/resources/default_100_percent/common/window_minimize_short_normal.png
Binary files differ
diff --git a/ash/resources/default_100_percent/common/window_minimize_short_pressed.png b/ash/resources/default_100_percent/common/window_minimize_short_pressed.png
new file mode 100644
index 0000000..d2fef09
--- /dev/null
+++ b/ash/resources/default_100_percent/common/window_minimize_short_pressed.png
Binary files differ
diff --git a/ash/resources/default_200_percent/common/window_minimize_short_hover.png b/ash/resources/default_200_percent/common/window_minimize_short_hover.png
new file mode 100644
index 0000000..79288b7
--- /dev/null
+++ b/ash/resources/default_200_percent/common/window_minimize_short_hover.png
Binary files differ
diff --git a/ash/resources/default_200_percent/common/window_minimize_short_normal.png b/ash/resources/default_200_percent/common/window_minimize_short_normal.png
new file mode 100644
index 0000000..c62b876
--- /dev/null
+++ b/ash/resources/default_200_percent/common/window_minimize_short_normal.png
Binary files differ
diff --git a/ash/resources/default_200_percent/common/window_minimize_short_pressed.png b/ash/resources/default_200_percent/common/window_minimize_short_pressed.png
new file mode 100644
index 0000000..3c0a40c
--- /dev/null
+++ b/ash/resources/default_200_percent/common/window_minimize_short_pressed.png
Binary files differ
diff --git a/ash/wm/frame_painter.cc b/ash/wm/frame_painter.cc
index d859c12..6817a75 100644
--- a/ash/wm/frame_painter.cc
+++ b/ash/wm/frame_painter.cc
@@ -510,26 +510,34 @@ void FramePainter::LayoutHeader(views::NonClientFrameView* view,
IDR_AURA_WINDOW_MAXIMIZED_CLOSE2_H,
IDR_AURA_WINDOW_MAXIMIZED_CLOSE2_P);
// The chat window cannot be restored but only minimized.
- // Case: (size_button_behavior_ == SIZE_BUTTON_MINIMIZES). We used to have
- // a special set of artwork to show this case, but per discussion we
- // removed this.
- SetButtonImages(size_button_,
- IDR_AURA_WINDOW_MAXIMIZED_RESTORE2,
- IDR_AURA_WINDOW_MAXIMIZED_RESTORE2_H,
- IDR_AURA_WINDOW_MAXIMIZED_RESTORE2_P);
+ if (size_button_behavior_ == SIZE_BUTTON_MINIMIZES) {
+ SetButtonImages(size_button_,
+ IDR_AURA_WINDOW_MINIMIZE_SHORT,
+ IDR_AURA_WINDOW_MINIMIZE_SHORT_H,
+ IDR_AURA_WINDOW_MINIMIZE_SHORT_P);
+ } else {
+ SetButtonImages(size_button_,
+ IDR_AURA_WINDOW_MAXIMIZED_RESTORE2,
+ IDR_AURA_WINDOW_MAXIMIZED_RESTORE2_H,
+ IDR_AURA_WINDOW_MAXIMIZED_RESTORE2_P);
+ }
} else if (shorter_layout) {
SetButtonImages(close_button_,
IDR_AURA_WINDOW_MAXIMIZED_CLOSE,
IDR_AURA_WINDOW_MAXIMIZED_CLOSE_H,
IDR_AURA_WINDOW_MAXIMIZED_CLOSE_P);
// The chat window cannot be restored but only minimized.
- // Case: (size_button_behavior_ == SIZE_BUTTON_MINIMIZES). We used to have
- // a special set of artwork to show this case, but per discussion we
- // removed this.
- SetButtonImages(size_button_,
- IDR_AURA_WINDOW_MAXIMIZED_RESTORE,
- IDR_AURA_WINDOW_MAXIMIZED_RESTORE_H,
- IDR_AURA_WINDOW_MAXIMIZED_RESTORE_P);
+ if (size_button_behavior_ == SIZE_BUTTON_MINIMIZES) {
+ SetButtonImages(size_button_,
+ IDR_AURA_WINDOW_MINIMIZE_SHORT,
+ IDR_AURA_WINDOW_MINIMIZE_SHORT_H,
+ IDR_AURA_WINDOW_MINIMIZE_SHORT_P);
+ } else {
+ SetButtonImages(size_button_,
+ IDR_AURA_WINDOW_MAXIMIZED_RESTORE,
+ IDR_AURA_WINDOW_MAXIMIZED_RESTORE_H,
+ IDR_AURA_WINDOW_MAXIMIZED_RESTORE_P);
+ }
} else {
SetButtonImages(close_button_,
IDR_AURA_WINDOW_CLOSE,