Commit ffec9ada authored by Takumi Fujimoto's avatar Takumi Fujimoto Committed by Commit Bot

Use correct width in Cast-related dialogs

Subtract margin width from the preferred widths of the media remoting
and cloud services dialogs, so that they have the intended width.

Bug: 875102
Change-Id: I362dd2bbae7f533df3f9f51d851c7f7b5d136908
Reviewed-on: https://chromium-review.googlesource.com/1187577Reviewed-by: default avatarBret Sepulveda <bsep@chromium.org>
Commit-Queue: Takumi Fujimoto <takumif@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585896}
parent 7caa6679
......@@ -102,7 +102,8 @@ bool CloudServicesDialogView::Cancel() {
gfx::Size CloudServicesDialogView::CalculatePreferredSize() const {
const int width = ChromeLayoutProvider::Get()->GetDistanceMetric(
DISTANCE_BUBBLE_PREFERRED_WIDTH);
DISTANCE_BUBBLE_PREFERRED_WIDTH) -
margins().width();
return gfx::Size(width, GetHeightForWidth(width));
}
......
......@@ -106,7 +106,8 @@ bool MediaRemotingDialogView::Close() {
gfx::Size MediaRemotingDialogView::CalculatePreferredSize() const {
const int width = ChromeLayoutProvider::Get()->GetDistanceMetric(
DISTANCE_BUBBLE_PREFERRED_WIDTH);
DISTANCE_BUBBLE_PREFERRED_WIDTH) -
margins().width();
return gfx::Size(width, GetHeightForWidth(width));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment