File: toolbar.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 (123 lines) | stat: -rw-r--r-- 3,236 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
<style include="cr-icons cr-hidden-style settings-shared">
  :host {
    align-items: center;
    background-color: var(--settings-base-bg-color);
    color: var(--cros-text-color-secondary);
    display: flex;
    height: var(--settings-toolbar-height);
    padding-top: var(--settings-toolbar-padding-top);
  }

  h1 {
    color: var(--cros-sys-primary);
    flex: 1;
    font: var(--cros-title-1-font);
    margin-inline-start: 8px;
    padding-inline-end: 12px;
  }

  #leftContent {
    position: relative;
    transition: opacity 100ms;
  }

  #leftSpacer {
    align-items: center;
    box-sizing: border-box;
    display: flex;
    padding-inline-start: var(--settings-toolbar-padding-inline-start);
    width: var(--settings-menu-width);
  }

  :host([narrow]) #leftSpacer {
    width: 20px;
    padding-inline-start: var(--settings-toolbar-padding-inline-start-narrow);
  }

  cr-icon-button {
    --cr-icon-button-fill-color: currentColor;
    --cr-icon-button-size: 32px;
    min-width: 32px;
  }

  #centeredContent {
    display: flex;
    flex: 1 1 0;
    justify-content: center;
  }

  :host([narrow]) #centeredContent {
    position: absolute;
    width: 100%;
    /* #centeredContent should always be below #leftContent */
    z-index: -1;
  }

  :host([narrow]:not([showing-search_])) #centeredContent {
    justify-content: flex-end;
  }

  :host([has-overlay]) {
    transition: visibility var(--cr-toolbar-overlay-animation-duration);
    visibility: hidden;
  }

  #settingsTitle {
    white-space: nowrap;
  }

  :host([narrow][showing-search_]) #settingsTitle {
    display: none;
  }

  :host([showing-search_][is-search-box-cutoff_]) os-settings-search-box {
    --cr-toolbar-field-width: min(80vw,
      var(--settings-toolbar-search-box-width));
    /* No overlap with #leftContent. */
    margin-inline-start: 48px;
  }

  :host([showing-search_][is-search-box-cutoff_][narrow]) os-settings-search-box {
    --cr-toolbar-field-width: min(80vw,
      var(--settings-toolbar-narrow-search-box-width));
  }

  :host([showing-search_][narrow]:not([is-search-box-cutoff_]))
      os-settings-search-box {
    --cr-toolbar-field-width: var(--settings-toolbar-narrow-search-box-width);
  }

  :host(:not([narrow]):not([is-search-box-cutoff_]))
      os-settings-search-box {
    --cr-toolbar-field-width: var(--settings-toolbar-search-box-width);
  }

  :host(:not([narrow])) #leftContent {
    flex: 0 1 0;
  }

  :host(:not([narrow])) #centeredContent {
    flex-basis: var(--settings-main-basis);
  }
</style>
<iron-media-query query="(max-width: 780px)"
    query-matches="{{isSearchBoxCutoff_}}">
</iron-media-query>
<div id="leftContent">
  <div id="leftSpacer">
    <template is="dom-if" if="[[showMenu]]">
      <cr-icon-button id="menuButton" class="no-overlap"
          iron-icon="cr20:menu" on-click="onMenuClick_"
          aria-label="$i18n{menuButtonLabel}"
          title="$i18n{menuButtonLabel}">
      </cr-icon-button>
    </template>
    <h1 id="settingsTitle">$i18n{settings}</h1>
  </div>
</div>

<div id="centeredContent" hidden$="[[!showSearch]]">
  <os-settings-search-box id="searchBox" narrow="[[narrow]]"
      showing-search="{{showingSearch_}}">
  </os-settings-search-box>
</div>