Skip to content

Commit

Permalink
Update compose to 0.4.0.
Browse files Browse the repository at this point in the history
Fix end padding for dropdowns
  • Loading branch information
CarsonRedeye committed Jun 3, 2021
1 parent 2cde961 commit dee44fd
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ buildscript {

dependencies {
// __LATEST_COMPOSE_RELEASE_VERSION__
classpath("org.jetbrains.compose:compose-gradle-plugin:0.4.0-build182")
classpath("org.jetbrains.compose:compose-gradle-plugin:0.4.0")
classpath("com.android.tools.build:gradle:4.0.1")
classpath(kotlin("gradle-plugin", version = "1.4.32"))
classpath(kotlin("gradle-plugin", version = "1.5.10"))
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,20 @@ private fun MenuItems(
isPointerHovering = false
false
}
).padding(horizontal = 6.dp)
)
.background(
if (isPointerHovering) MacTheme.colors.primary.copy(alpha = 0.7f) else Color.Unspecified,
shape = RoundedCornerShape(4.dp)
),
contentPadding = PaddingValues(0.dp)
) {
Row(
Modifier.fillMaxHeight().padding(2.dp),
Modifier.fillMaxHeight().padding(
start = 2.dp,
top = 2.dp,
end = 12.dp,
bottom = 2.dp
),
verticalAlignment = Alignment.CenterVertically
) {
val checkOrSpace = if (index == selectedIndex) "\uDBC0\uDD85" else " "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ internal fun MacDropdownMenu(
}

Popup(
isFocusable = true, // Required to allow dismissing dropdown by clicking outside
focusable = true, // Required to allow dismissing dropdown by clicking outside
onDismissRequest = onDismissRequest,
popupPositionProvider = popupPositionProvider
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ internal fun DropdownMenuContent(
) {
Column(
modifier = modifier
.padding(vertical = DropdownMenuItemVerticalPadding)
.padding(all = DropdownMenuItemVerticalPadding)
.width(IntrinsicSize.Max)
.verticalScroll(rememberScrollState()),
content = content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,10 @@ import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.material.ButtonDefaults
import androidx.compose.material.ButtonElevation
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.State
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
Expand All @@ -39,6 +35,7 @@ fun NativeExampleView() {
}
}
}

Crossfade(
targetState = currentDisplayingTheme,
animationSpec = TweenSpec(2500)
Expand Down

0 comments on commit dee44fd

Please sign in to comment.