-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8139 from wmontwe/add-drawer-folder-list-part3
Add drawer folder list - part 3
- Loading branch information
Showing
26 changed files
with
754 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...ignsystem/src/main/kotlin/app/k9mail/core/ui/compose/designsystem/atom/icon/filled/Dot.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package app.k9mail.core.ui.compose.designsystem.atom.icon.filled | ||
|
||
import androidx.compose.material.icons.Icons | ||
import androidx.compose.material.icons.materialIcon | ||
import androidx.compose.material.icons.materialPath | ||
import androidx.compose.ui.graphics.vector.ImageVector | ||
|
||
@Suppress("MagicNumber") | ||
val Icons.Filled.Dot: ImageVector | ||
get() { | ||
if (instance != null) { | ||
return instance!! | ||
} | ||
instance = materialIcon(name = "Filled.Dot") { | ||
materialPath { | ||
moveTo(12.0f, 6.0f) | ||
curveToRelative(-3.31f, 0.0f, -6.0f, 2.69f, -6.0f, 6.0f) | ||
reflectiveCurveToRelative(2.69f, 6.0f, 6.0f, 6.0f) | ||
reflectiveCurveToRelative(6.0f, -2.69f, 6.0f, -6.0f) | ||
reflectiveCurveToRelative(-2.69f, -6.0f, -6.0f, -6.0f) | ||
close() | ||
} | ||
} | ||
return instance!! | ||
} | ||
|
||
private var instance: ImageVector? = null |
32 changes: 29 additions & 3 deletions
32
...tlin/app/k9mail/core/ui/compose/designsystem/organism/drawer/NavigationDrawerItemBadge.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,42 @@ | ||
package app.k9mail.core.ui.compose.designsystem.organism.drawer | ||
|
||
import androidx.compose.foundation.layout.Row | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.foundation.layout.size | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.graphics.vector.ImageVector | ||
import app.k9mail.core.ui.compose.designsystem.atom.icon.Icon | ||
import app.k9mail.core.ui.compose.designsystem.atom.text.TextLabelLarge | ||
import app.k9mail.core.ui.compose.theme2.MainTheme | ||
|
||
/** | ||
* A badge for a navigation drawer item with an optional icon. | ||
* | ||
* @param label The label to display. | ||
* @param modifier The modifier to apply. | ||
* @param imageVector The image vector to display (optional). | ||
*/ | ||
@Composable | ||
fun NavigationDrawerItemBadge( | ||
label: String, | ||
modifier: Modifier = Modifier, | ||
imageVector: ImageVector? = null, | ||
) { | ||
TextLabelLarge( | ||
text = label, | ||
Row( | ||
modifier = modifier, | ||
) | ||
verticalAlignment = Alignment.CenterVertically, | ||
) { | ||
if (imageVector != null) { | ||
Icon( | ||
imageVector = imageVector, | ||
modifier = Modifier.size(MainTheme.sizes.iconSmall) | ||
.padding(end = MainTheme.spacings.quarter), | ||
) | ||
} | ||
TextLabelLarge( | ||
text = label, | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.