Commit 3838698b authored by Gavin Williams's avatar Gavin Williams Committed by Commit Bot

Set width for destination dropdown

Use existing print preview sidebar variables to set the width the 192px.

Bug: 1059607
Change-Id: I173385684f57ddf204d5bb8c109d5e070381f3ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2284966
Commit-Queue: Gavin Williams <gavinwill@chromium.org>
Reviewed-by: default avatarRebekah Potter <rbpotter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#786624}
parent 3939fba3
<style include="cr-shared-style cr-hidden-style"> <style include="cr-shared-style cr-hidden-style">
#destination-dropdown {
position: relative;
}
#destination-dropdown,
iron-dropdown {
width: var(--print-preview-dropdown-width);
}
iron-dropdown { iron-dropdown {
border: 0.5px solid rgba(0, 0, 0, 0.5); border: 0.5px solid rgba(0, 0, 0, 0.5);
max-height: 270px; max-height: 270px;
...@@ -61,10 +70,6 @@ ...@@ -61,10 +70,6 @@
padding-inline-start: 8px; padding-inline-start: 8px;
} }
#destination-dropdown {
position: relative;
}
#destination-display-container { #destination-display-container {
align-items: center; align-items: center;
background-color: var(--google-grey-refresh-100); background-color: var(--google-grey-refresh-100);
......
...@@ -8,6 +8,8 @@ import 'chrome://resources/cr_elements/shared_vars_css.m.js'; ...@@ -8,6 +8,8 @@ import 'chrome://resources/cr_elements/shared_vars_css.m.js';
import 'chrome://resources/polymer/v3_0/iron-dropdown/iron-dropdown.js'; import 'chrome://resources/polymer/v3_0/iron-dropdown/iron-dropdown.js';
import 'chrome://resources/polymer/v3_0/iron-icon/iron-icon.js'; import 'chrome://resources/polymer/v3_0/iron-icon/iron-icon.js';
import './print_preview_vars_css.js';
import {html, Polymer} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; import {html, Polymer} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js';
import {Destination, DestinationOrigin} from '../data/destination.js'; import {Destination, DestinationOrigin} from '../data/destination.js';
......
...@@ -5,6 +5,10 @@ ...@@ -5,6 +5,10 @@
--print-preview-sidebar-width: 384px; --print-preview-sidebar-width: 384px;
--print-preview-title-width: 120px; --print-preview-title-width: 120px;
--print-preview-sidebar-margin: 24px; --print-preview-sidebar-margin: 24px;
/* Controls width = total width - title width - start/middle/end margin */
--print-preview-dropdown-width: calc(var(--print-preview-sidebar-width)
- var(--print-preview-title-width)
- 3 * var(--print-preview-sidebar-margin));
--print-preview-settings-border: 1px solid var(--google-grey-200); --print-preview-settings-border: 1px solid var(--google-grey-200);
--print-preview-dialog-margin: 34px; --print-preview-dialog-margin: 34px;
......
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