File: os_settings_ui.html

package info (click to toggle)
chromium 138.0.7204.183-1~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 6,080,960 kB
  • sloc: cpp: 34,937,079; ansic: 7,176,967; javascript: 4,110,704; python: 1,419,954; asm: 946,768; xml: 739,971; pascal: 187,324; sh: 89,623; perl: 88,663; objc: 79,944; sql: 50,304; cs: 41,786; fortran: 24,137; makefile: 21,811; php: 13,980; tcl: 13,166; yacc: 8,925; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (159 lines) | stat: -rw-r--r-- 4,521 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<style include="cr-page-host-style settings-shared">
  :host {
    display: flex;
    flex-direction: column;
    height: 100%;

    /* Centered cards has a max-width of var(--cr-centered-card-max-width)
      * and a width of a certain percentage. Therefore, to make room for the
      * cards to be at their max width, the flex-basis of #main needs to be
      * whatever value the percentage of would equal to the max width. */
    --settings-main-basis: calc(var(--cr-centered-card-max-width) /
        var(--cr-centered-card-width-percentage));
    --cr-card-border-radius: 4px;
    --cr-card-shadow: var(--cr-elevation-1);
    --cr-toolbar-padding-top: 8px;
  }

  settings-toolbar {
    /* TODO(hsuregan): update for dark mode when needed. */
    min-height: 56px;
    /* Needs to be higher than #cr-container-show-top's z-index so that the
      * new settings search dropdown is not struck through by the shadow. */
    z-index: 3;
  }

  #drawer {
    /* TODO(b/316088424) Use window border radius token if available */
    --cr-drawer-border-start-end-radius: 12px;
    --cr-drawer-border-end-end-radius: 12px;
    --cr-drawer-header-color: var(--cros-sys-primary);
    --cr-drawer-header-font: var(--cros-title-1-font);
    --cr-drawer-header-padding: 22px;
    --cr-drawer-width: var(--settings-menu-width);
    --cr-separator-line: none;
  }

  #cr-container-shadow-top {
    /* Needs to be higher than #container's z-index to appear above
      * scrollbars. */
    z-index: 2;
  }

  #container {
    align-items: flex-start;
    display: flex;
    flex: 1;
    overflow: overlay;
    position: relative;
  }

  #left,
  #center {
    flex: 1 1 0;
  }

  #left {
    flex-grow: 0;
    height: 100%;
    position: sticky;
    top: 0;
    /* Specify z-index so menu item tooltips overlay #center content. */
    z-index: 100;
  }

  #left os-settings-menu {
    height: 100%;
    overflow: auto;
    overscroll-behavior: contain;
  }

  #center {
    box-sizing: border-box;
    flex-basis: var(--settings-main-basis);
    height: 100%;
    padding-top: 8px;
  }

  /* Take up all remaining vertical space. */
  #center > os-settings-main {
    min-height: 100%;
  }

  /* The breakpoint of 980px was decided on by the rounded sum of
    * var(--settings-main-basis), var(--settings-menu-width), and
    * var(--cr-section-padding). */
  @media (max-width: 980px) {
    #left {
      display: none;
    }

    #center {
      min-width: auto;
      /* Add some padding to make room for borders and to prevent focus
        * indicators from being cropped. */
      padding: 0 3px;
    }
  }

  #drawerIcon {
    --iron-icon-fill-color: var(--cros-sys-primary);

    cursor: pointer;
    margin-inline-end: 6px;
    margin-inline-start: 0;
    outline: none;
  }
</style>
<settings-prefs id="prefs" prefs="{{prefs}}"></settings-prefs>
<iron-media-query query="(max-width: [[narrowThreshold_]]px)"
    query-matches="{{isNarrow}}">
</iron-media-query>
<template is="dom-if" if="[[showToolbar_]]">
  <settings-toolbar on-settings-toolbar-menu-tap="onMenuButtonClick_"
      spinner-active="[[toolbarSpinnerActive_]]"
      role="banner"
      narrow="[[isNarrow]]"
      narrow-threshold="980"
      show-menu="[[isNarrow]]">
  </settings-toolbar>
</template>
<template is="dom-if" if="[[showNavMenu_]]">
  <cr-drawer id="drawer" on-close="onMenuClose_" heading="$i18n{settings}"
      align="$i18n{textdirection}">
    <div slot="header-icon">
      <cr-icon-button id="drawerIcon"
          iron-icon="cr20:menu"
          on-click="onDrawerIconClick_"
          title="$i18n{close}">
      </cr-icon-button>
    </div>
    <div slot="body">
      <template is="dom-if" id="drawerTemplate">
        <os-settings-menu
            is-drawer-menu
            page-availability="[[pageAvailability_]]"
            on-iron-activate="onMenuItemSelected_">
        </os-settings-menu>
      </template>
    </div>
  </cr-drawer>
</template>
<!-- #container is the shadow container for CrContainerShadowMixin. -->
<div id="container" class="no-outline">
  <div id="left">
    <template is="dom-if" if="[[showNavMenu_]]">
      <os-settings-menu
          page-availability="[[pageAvailability_]]"
          on-iron-activate="onMenuItemSelected_">
      </os-settings-menu>
    </template>
  </div>
  <div id="center">
    <os-settings-main
        prefs="{{prefs}}"
        toolbar-spinner-active="{{toolbarSpinnerActive_}}"
        page-availability="[[pageAvailability_]]">
    </os-settings-main>
  </div>
</div>