Skip to content

Commit ce10f48

Browse files
authored
Merge pull request #909 from wordpress-mobile/issue/908-fix-toolbar-cross
Added logic to rotate the add button only when selected
2 parents 1e09b7d + c4e1db0 commit ce10f48

7 files changed

+19
-7
lines changed

aztec/src/main/kotlin/org/wordpress/aztec/toolbar/ToolbarAction.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ enum class ToolbarAction constructor(
2222
setOf(AztecTextFormat.FORMAT_NONE)),
2323
ADD_MEDIA_EXPAND(
2424
R.id.format_bar_button_media_expanded,
25-
R.drawable.format_bar_button_media_expanded_selector,
25+
R.drawable.format_bar_button_media_collapsed_selector,
2626
ToolbarActionType.OTHER,
2727
setOf(AztecTextFormat.FORMAT_NONE)),
2828
HEADING(R.id.format_bar_button_heading,

aztec/src/main/res/drawable/format_bar_button_media_collapsed.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,14 @@
77
android:viewportHeight="48"
88
android:viewportWidth="48">
99

10+
<group
11+
android:pivotX="24"
12+
android:pivotY="24"
13+
android:rotation="45.0">
1014
<path
1115
android:fillColor="?attr/toolbarIconNormalColor"
1216
android:pathData="M24,15.3c4.8,0,8.7,3.9,8.7,8.7s-3.9,8.7-8.7,8.7s-8.7-3.9-8.7-8.7S19.2,15.3,24,15.3 M24,13.1c-6,0-10.9,4.9-10.9,10.9 S18,34.9,24,34.9S34.9,30,34.9,24S30,13.1,24,13.1L24,13.1z M29.5,22.9h-4.4v-4.4h-2.2v4.4h-4.4v2.2h4.4v4.4h2.2v-4.4h4.4V22.9z">
1317
</path>
18+
</group>
1419

1520
</vector>

aztec/src/main/res/drawable/format_bar_button_media_collapsed_disabled.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,14 @@
88
android:viewportWidth="48" >
99

1010
<!-- @color/grey_lighten_20 -->
11+
<group
12+
android:pivotX="24"
13+
android:pivotY="24"
14+
android:rotation="45.0">
1115
<path
1216
android:fillColor="?attr/toolbarIconDisabledColor"
1317
android:pathData="M24,15.3c4.8,0,8.7,3.9,8.7,8.7s-3.9,8.7-8.7,8.7s-8.7-3.9-8.7-8.7S19.2,15.3,24,15.3 M24,13.1c-6,0-10.9,4.9-10.9,10.9 S18,34.9,24,34.9S34.9,30,34.9,24S30,13.1,24,13.1L24,13.1z M29.5,22.9h-4.4v-4.4h-2.2v4.4h-4.4v2.2h4.4v4.4h2.2v-4.4h4.4V22.9z" >
1418
</path>
19+
</group>
1520

1621
</vector>

aztec/src/main/res/drawable/format_bar_button_media_collapsed_highlighted.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,14 @@
88
android:viewportWidth="48" >
99

1010
<!-- @color/almost_black -->
11+
<group
12+
android:pivotX="24"
13+
android:pivotY="24"
14+
android:rotation="45.0">
1115
<path
1216
android:fillColor="?attr/toolbarIconHighlightColor"
1317
android:pathData="M24,15.3c4.8,0,8.7,3.9,8.7,8.7s-3.9,8.7-8.7,8.7s-8.7-3.9-8.7-8.7S19.2,15.3,24,15.3 M24,13.1c-6,0-10.9,4.9-10.9,10.9 S18,34.9,24,34.9S34.9,30,34.9,24S30,13.1,24,13.1L24,13.1z M29.5,22.9h-4.4v-4.4h-2.2v4.4h-4.4v2.2h4.4v4.4h2.2v-4.4h4.4V22.9z" >
1418
</path>
19+
</group>
1520

1621
</vector>

aztec/src/main/res/drawable/format_bar_button_media_expanded.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88

99
<group
1010
android:pivotX="24"
11-
android:pivotY="24"
12-
android:rotation="45.0">
11+
android:pivotY="24">
1312
<path
1413
android:fillColor="?attr/toolbarIconNormalColor"
1514
android:pathData="M24,15.3c4.8,0,8.7,3.9,8.7,8.7s-3.9,8.7-8.7,8.7s-8.7-3.9-8.7-8.7S19.2,15.3,24,15.3 M24,13.1c-6,0-10.9,4.9-10.9,10.9 S18,34.9,24,34.9S34.9,30,34.9,24S30,13.1,24,13.1L24,13.1z M29.5,22.9h-4.4v-4.4h-2.2v4.4h-4.4v2.2h4.4v4.4h2.2v-4.4h4.4V22.9z">

aztec/src/main/res/drawable/format_bar_button_media_expanded_disabled.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88

99
<group
1010
android:pivotX="24"
11-
android:pivotY="24"
12-
android:rotation="45.0">
11+
android:pivotY="24">
1312
<path
1413
android:fillColor="?attr/toolbarIconDisabledColor"
1514
android:pathData="M24,15.3c4.8,0,8.7,3.9,8.7,8.7s-3.9,8.7-8.7,8.7s-8.7-3.9-8.7-8.7S19.2,15.3,24,15.3 M24,13.1c-6,0-10.9,4.9-10.9,10.9 S18,34.9,24,34.9S34.9,30,34.9,24S30,13.1,24,13.1L24,13.1z M29.5,22.9h-4.4v-4.4h-2.2v4.4h-4.4v2.2h4.4v4.4h2.2v-4.4h4.4V22.9z">

aztec/src/main/res/drawable/format_bar_button_media_expanded_highlighted.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88

99
<group
1010
android:pivotX="24"
11-
android:pivotY="24"
12-
android:rotation="45.0">
11+
android:pivotY="24">
1312
<path
1413
android:fillColor="?attr/toolbarIconHighlightColor"
1514
android:pathData="M24,15.3c4.8,0,8.7,3.9,8.7,8.7s-3.9,8.7-8.7,8.7s-8.7-3.9-8.7-8.7S19.2,15.3,24,15.3 M24,13.1c-6,0-10.9,4.9-10.9,10.9 S18,34.9,24,34.9S34.9,30,34.9,24S30,13.1,24,13.1L24,13.1z M29.5,22.9h-4.4v-4.4h-2.2v4.4h-4.4v2.2h4.4v4.4h2.2v-4.4h4.4V22.9z">

0 commit comments

Comments
 (0)