Skip to content

Commit

Permalink
tweak omnibox and about:version styles
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex313031 committed Apr 4, 2024
1 parent 9c63367 commit 1e41e8c
Show file tree
Hide file tree
Showing 3 changed files with 141 additions and 4 deletions.
4 changes: 2 additions & 2 deletions patches/win7-8-8.1-support_thorium.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5818,7 +5818,7 @@ index b4b2f01a846a7..e834ebb91d7af 100644

int LocationBarView::GetBorderRadius() const {
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("classic-omnibox"))
+ return 0;
+ return 3;
return ChromeLayoutProvider::Get()->GetCornerRadiusMetric(
views::Emphasis::kMaximum, size());
}
Expand Down Expand Up @@ -20298,7 +20298,7 @@ index 5319192415a63..090fd4574c19a 100644
int LayoutProvider::GetCornerRadiusMetric(ShapeContextTokens id,
const gfx::Size& size) const {
+ if (!base::CommandLine::ForCurrentProcess()->HasSwitch("classic-omnibox"))
+ return 0;
+ return 3;
if (!features::IsChromeRefresh2023()) {
switch (id) {
case ShapeContextTokens::kBadgeRadius:
Expand Down
4 changes: 2 additions & 2 deletions patches/winxp-vista-support_thorium.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5917,7 +5917,7 @@ index b4b2f01a846a7..e834ebb91d7af 100644

int LocationBarView::GetBorderRadius() const {
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("classic-omnibox"))
+ return 0;
+ return 3;
return ChromeLayoutProvider::Get()->GetCornerRadiusMetric(
views::Emphasis::kMaximum, size());
}
Expand Down Expand Up @@ -20482,7 +20482,7 @@ index 5319192415a63..090fd4574c19a 100644
int LayoutProvider::GetCornerRadiusMetric(ShapeContextTokens id,
const gfx::Size& size) const {
+ if (!base::CommandLine::ForCurrentProcess()->HasSwitch("classic-omnibox"))
+ return 0;
+ return 3;
if (!features::IsChromeRefresh2023()) {
switch (id) {
case ShapeContextTokens::kBadgeRadius:
Expand Down
137 changes: 137 additions & 0 deletions src/components/version_ui/resources/about_version.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
/* Copyright 2024 The Chromium Authors and Alex313031
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file. */

html {
--google-grey-200-rgb: 232, 234, 237;
--google-grey-200: rgb(var(--google-grey-200-rgb));
--google-grey-900-rgb: 32, 33, 36;
--google-grey-900: rgb(var(--google-grey-900-rgb));
--primary-color: var(--google-grey-900);
--active-background-color: rgba(var(--google-grey-900-rgb), .16);
--hover-background-color: rgba(var(--google-grey-900-rgb), .1);
--background-color: white;
background: var(--background-color);
}

@media (prefers-color-scheme: dark) {
html {
--primary-color: var(--google-grey-200);
--active-background-color: rgba(var(--google-grey-200-rgb), .16);
--hover-background-color: rgba(var(--google-grey-200-rgb), .1);
--background-color: var(--google-grey-900);
background: var(--background-color);
}
}

body {
color: var(--primary-color);
font-size: 100%;
margin: 0;
}

#outer {
margin-inline-end: auto;
margin-inline-start: auto;
margin-top: 10px;
min-width: 800px;
width: 60%;
}

#inner {
padding-top: 10px;
word-break: break-word;
}

.label {
font-size: 0.9em;
font-weight: bold;
padding-inline-end: 5px;
text-align: end;
vertical-align: top;
white-space: nowrap;
}

.label::after {
content: ':';
}

#logo {
float: right;
margin-inline-start: 40px;
text-align: end;
width: 256px;
}

#company {
font-size: 0.7em;
text-align: end;
}

#copyright {
font-size: 0.7em;
text-align: end;
}

#useragent {
font-family: monospace;
}

.version {
font-family: monospace;
max-width: 430px;
padding-inline-start: 5px;
vertical-align: bottom;
}

.version-wide {
font-family: monospace;
max-width: auto;
padding-inline-start: 5px;
vertical-align: bottom;
}

#copy-to-clipboard,
#copy-os-content-to-clipboard {
background-color: var(--background-color);
border: none;
border-radius: 2px;
cursor: pointer;
}

#copy-to-clipboard-icon {
-webkit-mask-image: url(chrome://resources/images/icon_copy_content.svg);
-webkit-mask-size: cover;
background: none;
background-color: var(--primary-color);
display: inline-block;
height: 1em;
padding: 0;
position: relative;
top: .2em;
width: 1em;
}

@media (forced-colors: active) {
#copy-to-clipboard-icon {
background-color: ButtonText;
}
}

#copy-to-clipboard:hover,
#copy-os-content-to-clipboard:hover {
background-color: var(--hover-background-color);
}

#copy-to-clipboard:active,
#copy-os-content-to-clipboard:active {
background-color: var(--active-background-color);
}

#messages {
clip: rect(0 0 0 0);
height: 1px;
overflow: hidden;
position: fixed;
width: 1px;
}

0 comments on commit 1e41e8c

Please sign in to comment.