Skip to content

Commit 0c02fc8

Browse files
ergunshDevtools-frontend LUCI CQ
authored andcommitted
[Animations] Use animation icon for the animation link swatch
Drive-by: * Add `title` to the icon Bug: 349566091 Change-Id: Ic21b475cf512c4ddb910a2408f6eb6ffd9d9a3f7 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5973206 Commit-Queue: Ergün Erdoğmuş <[email protected]> Auto-Submit: Ergün Erdoğmuş <[email protected]> Reviewed-by: Changhao Han <[email protected]>
1 parent 1abf71d commit 0c02fc8

File tree

5 files changed

+13
-3
lines changed

5 files changed

+13
-3
lines changed

config/gni/devtools_grd_files.gni

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ grd_files_release_sources = [
3636
"front_end/Images/align-self-end.svg",
3737
"front_end/Images/align-self-start.svg",
3838
"front_end/Images/align-self-stretch.svg",
39+
"front_end/Images/animation.svg",
3940
"front_end/Images/arrow-back.svg",
4041
"front_end/Images/arrow-down.svg",
4142
"front_end/Images/arrow-drop-down-dark.svg",

config/gni/devtools_image_files.gni

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ devtools_svg_sources = [
4343
"align-self-end.svg",
4444
"align-self-start.svg",
4545
"align-self-stretch.svg",
46+
"animation.svg",
4647
"arrow-back.svg",
4748
"arrow-down.svg",
4849
"arrow-drop-down-dark.svg",

front_end/Images/src/animation.svg

Lines changed: 3 additions & 0 deletions
Loading

front_end/panels/elements/StylePropertyTreeElement.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ const UIStrings = {
141141
*@description A context menu item in Styles panel to copy all declarations of CSS rule as JavaScript properties.
142142
*/
143143
copyAllCssDeclarationsAsJs: 'Copy all declarations as JS',
144+
/**
145+
*@description Title of the link in Styles panel to jump to the Animations panel.
146+
*/
147+
jumpToAnimationsPanel: 'Jump to Animations panel',
144148
};
145149
const str_ = i18n.i18n.registerUIStrings('panels/elements/StylePropertyTreeElement.ts', UIStrings);
146150
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
@@ -770,9 +774,10 @@ export class LinkableNameRenderer implements MatchRenderer<LinkableNameMatch> {
770774
return;
771775
}
772776

773-
const icon = IconButton.Icon.create('open-externally', 'open-in-animations-panel');
777+
const icon = IconButton.Icon.create('animation', 'open-in-animations-panel');
774778
icon.setAttribute('jslog', `${VisualLogging.link('open-in-animations-panel').track({click: true})}`);
775779
icon.setAttribute('role', 'button');
780+
icon.setAttribute('title', i18nString(UIStrings.jumpToAnimationsPanel));
776781
icon.addEventListener('mouseup', ev => {
777782
ev.consume(true);
778783

front_end/panels/elements/stylePropertiesTreeOutline.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,10 +281,10 @@ devtools-icon.open-in-animations-panel {
281281
transform: scale(0.7);
282282
margin: -5px -2px -3px -4px;
283283
user-select: none;
284-
color: var(--icon-default);
284+
color: var(--icon-css);
285285
cursor: default;
286286

287287
&:hover {
288-
color: var(--icon-default-hover);
288+
color: var(--icon-css-hover);
289289
}
290290
}

0 commit comments

Comments
 (0)