From c47102c892347a0593b49a5cda247b117a390823 Mon Sep 17 00:00:00 2001 From: Sasikanth Miriyampalli Date: Thu, 5 Oct 2023 10:23:21 +0530 Subject: [PATCH] Update settings icon --- .../rss/reader/resources/icons/Tune.kt | 106 ++++++++++++++++++ .../rss/reader/home/ui/HomeTopAppBar.kt | 7 +- 2 files changed, 108 insertions(+), 5 deletions(-) create mode 100644 resources/icons/src/commonMain/kotlin/dev/sasikanth/rss/reader/resources/icons/Tune.kt diff --git a/resources/icons/src/commonMain/kotlin/dev/sasikanth/rss/reader/resources/icons/Tune.kt b/resources/icons/src/commonMain/kotlin/dev/sasikanth/rss/reader/resources/icons/Tune.kt new file mode 100644 index 000000000..8d9b8eca6 --- /dev/null +++ b/resources/icons/src/commonMain/kotlin/dev/sasikanth/rss/reader/resources/icons/Tune.kt @@ -0,0 +1,106 @@ +/* + * Copyright 2023 Sasikanth Miriyampalli + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dev.sasikanth.rss.reader.resources.icons + +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.PathFillType.Companion.NonZero +import androidx.compose.ui.graphics.SolidColor +import androidx.compose.ui.graphics.StrokeCap.Companion.Butt +import androidx.compose.ui.graphics.StrokeJoin.Companion.Miter +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.graphics.vector.ImageVector.Builder +import androidx.compose.ui.graphics.vector.path +import androidx.compose.ui.unit.dp + +val TwineIcons.Tune: ImageVector + get() { + if (tune != null) { + return tune!! + } + tune = + Builder( + name = "Tune", + defaultWidth = 24.0.dp, + defaultHeight = 24.0.dp, + viewportWidth = 24.0f, + viewportHeight = 24.0f + ) + .apply { + path( + fill = SolidColor(Color(0xFF000000)), + stroke = null, + strokeLineWidth = 0.0f, + strokeLineCap = Butt, + strokeLineJoin = Miter, + strokeLineMiter = 4.0f, + pathFillType = NonZero + ) { + moveTo(11.0f, 21.0f) + verticalLineTo(15.0f) + horizontalLineTo(13.0f) + verticalLineTo(17.0f) + horizontalLineTo(21.0f) + verticalLineTo(19.0f) + horizontalLineTo(13.0f) + verticalLineTo(21.0f) + horizontalLineTo(11.0f) + close() + moveTo(3.0f, 19.0f) + verticalLineTo(17.0f) + horizontalLineTo(9.0f) + verticalLineTo(19.0f) + horizontalLineTo(3.0f) + close() + moveTo(7.0f, 15.0f) + verticalLineTo(13.0f) + horizontalLineTo(3.0f) + verticalLineTo(11.0f) + horizontalLineTo(7.0f) + verticalLineTo(9.0f) + horizontalLineTo(9.0f) + verticalLineTo(15.0f) + horizontalLineTo(7.0f) + close() + moveTo(11.0f, 13.0f) + verticalLineTo(11.0f) + horizontalLineTo(21.0f) + verticalLineTo(13.0f) + horizontalLineTo(11.0f) + close() + moveTo(15.0f, 9.0f) + verticalLineTo(3.0f) + horizontalLineTo(17.0f) + verticalLineTo(5.0f) + horizontalLineTo(21.0f) + verticalLineTo(7.0f) + horizontalLineTo(17.0f) + verticalLineTo(9.0f) + horizontalLineTo(15.0f) + close() + moveTo(3.0f, 7.0f) + verticalLineTo(5.0f) + horizontalLineTo(13.0f) + verticalLineTo(7.0f) + horizontalLineTo(3.0f) + close() + } + } + .build() + return tune!! + } + +private var tune: ImageVector? = null diff --git a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/HomeTopAppBar.kt b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/HomeTopAppBar.kt index dbe6d438f..d966ff469 100644 --- a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/HomeTopAppBar.kt +++ b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/HomeTopAppBar.kt @@ -32,7 +32,6 @@ import androidx.compose.foundation.lazy.LazyListState import androidx.compose.material.icons.Icons import androidx.compose.material.icons.rounded.MoreVert import androidx.compose.material.icons.rounded.Search -import androidx.compose.material.icons.rounded.Settings import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.material3.MaterialTheme @@ -51,6 +50,7 @@ import dev.sasikanth.rss.reader.components.DropdownMenu import dev.sasikanth.rss.reader.components.DropdownMenuItem import dev.sasikanth.rss.reader.resources.icons.Bookmarks import dev.sasikanth.rss.reader.resources.icons.RSS +import dev.sasikanth.rss.reader.resources.icons.Tune import dev.sasikanth.rss.reader.resources.icons.TwineIcons import dev.sasikanth.rss.reader.resources.strings.LocalStrings import dev.sasikanth.rss.reader.ui.AppTheme @@ -145,10 +145,7 @@ private fun OverflowMenu(onSettingsClicked: () -> Unit) { DropdownMenuItem( text = { Text(text = LocalStrings.current.settings) }, leadingIcon = { - Icon( - imageVector = Icons.Rounded.Settings, - contentDescription = LocalStrings.current.settings - ) + Icon(imageVector = TwineIcons.Tune, contentDescription = LocalStrings.current.settings) }, onClick = { dropdownExpanded = false