File: power_optimized_charging_dialog.html

package info (click to toggle)
chromium 140.0.7339.185-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 6,193,740 kB
  • sloc: cpp: 35,093,945; ansic: 7,161,670; javascript: 4,199,694; python: 1,441,797; asm: 949,904; xml: 747,515; pascal: 187,748; perl: 88,691; sh: 88,248; objc: 79,953; sql: 52,714; cs: 44,599; fortran: 24,137; makefile: 22,114; tcl: 15,277; php: 13,980; yacc: 9,000; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (114 lines) | stat: -rw-r--r-- 3,324 bytes parent folder | download | duplicates (3)
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
<style include="settings-shared">
  :host {
    --cr-dialog-width: 512px;
    --cr-dialog-height: 400px;

    --cr-dialog-title-slot-padding-top: 32px;
    --cr-dialog-title-slot-padding-start: 32px;
    --cr-dialog-title-slot-padding-end: 32px;

    --cr-dialog-body-padding-horizontal: 32px;

    /* When a radio button is aligned to the top of the container, the top of
     * the text doesn't always reach the top of the container, creating a
     * misalignment. This moves the radio button down by a couple of pixels to
     * make the alignment pixel-perfect with the text.
     */
    --cr-radio-button-disc-margin-block-start: 2px;

    --cr-dialog-button-container-padding-horizontal: 32px;
    --cr-dialog-button-container-padding-bottom: 32px;
  }

  #dialogTitleIcon {
    fill: var(--cros-sys-primary);

    width: 24px;
    height: 24px;

    padding-left: 8px;
    padding-right: 8px;

    margin-bottom: 20px;
  }

  #dialogTitle {
    font-size: 18px;
  }

  .link {
    color: var(--cr-link-color);
  }

  cr-radio-button {
    /* Align content to the top of div, and then pad the top so the radio button
       shadow doesn't get cut off. */
    align-items: start;
    padding-top: 12px;
  }

  cr-radio-button:not(:last-child) {
    /* Use padding not margin, so that the gap area remains clickable.*/
    padding-bottom: 16px;
  }

  cr-radio-button:not(:first-child) {
    /* Use padding not margin, so that the gap area remains clickable.*/
    padding-top: 16px;
  }

  cr-radio-button > div.cr-radio-button-title-text {
    color: var(--cr-primary-text-color);
  }

  cr-radio-button[checked] > div.cr-radio-button-title-text {
    font-weight: 500;
  }

  cr-radio-button:not([checked]) > div.cr-radio-button-title-text {
    font-weight: 400;
  }

</style>
<cr-dialog id="dialog" show-on-attach>
  <div slot="title">
    <iron-icon id="dialogTitleIcon" icon="os-settings:battery-charging-80">
    </iron-icon>
    <div id="dialogTitle" class="title">
      $i18n{powerOptimizedChargingLabel}
    </div>
  </div>
  <div slot="body">
    <cr-radio-group id="radioGroup" selected="{{selectedOption_}}">
      <cr-radio-button id="adaptiveCharging" name="adaptive-charging">
        <div class="cr-radio-button-title-text">
          $i18n{powerAdaptiveChargingLabel}
        </div>
        <div class="cr-secondary-text flex">
          $i18n{powerAdaptiveChargingSubtext}
          <a id="learn-more" href="$i18n{powerAdaptiveChargingLearnMoreUrl}"
              target="_blank"
              aria-description="$i18n{opensInNewTab}">
            $i18n{learnMore}
          </a>
        </div>
      </cr-radio-button>
      <cr-radio-button id="chargeLimit" name="charge-limit">
        <div class="cr-radio-button-title-text">
          $i18n{powerBatteryChargeLimitLabel}
        </div>
        <div class="cr-secondary-text flex">
          $i18n{powerBatteryChargeLimitSubtext}
        </div>
      </cr-radio-button>
    </cr-radio-group>
  </div>
  <div slot="button-container">
    <cr-button class="cancel-button" id="cancel" on-click="onCancelClick_">
        $i18n{powerOptimizedChargingDialogCancelLabel}
    </cr-button>
    <cr-button class="action-button" id="done" on-click="onDoneClick_">
        $i18n{powerOptimizedChargingDialogDoneLabel}
    </cr-button>
  </div>
</cr-dialog>