Skip to content

Commit

Permalink
KOA-5106 Update checkbox & radiobuttion paddings (#1063)
Browse files Browse the repository at this point in the history
These didn't match the design system
  • Loading branch information
marianeum authored May 31, 2022
1 parent c24a4ed commit 0ccbcc4
Show file tree
Hide file tree
Showing 60 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import net.skyscanner.backpack.util.use
open class BpkCheckbox @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
defStyleAttr: Int = 0,
) : AppCompatCheckBox(
createContextThemeWrapper(
createContextThemeWrapper(context, attrs, androidx.appcompat.R.attr.checkboxStyle),
Expand Down Expand Up @@ -78,6 +78,8 @@ open class BpkCheckbox @JvmOverloads constructor(
intArrayOf(textDisabledColor, textEnabledColor)
)
)

setPaddingRelative(resources.getDimensionPixelSize(R.dimen.bpkSpacingSm), paddingTop, paddingEnd, paddingBottom)
}

override fun setEnabled(enabled: Boolean) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ open class BpkRadioButton @JvmOverloads constructor(
intArrayOf(textDisabledColor, textEnabledColor),
)
)

setPaddingRelative(resources.getDimensionPixelSize(R.dimen.bpkSpacingSm), paddingTop, paddingEnd, paddingBottom)
}

override fun setEnabled(enabled: Boolean) {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/screenshots/dm/compose.checkbox.BpkCheckboxTest_checked.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/screenshots/dm/compose.checkbox.BpkCheckboxTest_default.png
Binary file modified app/screenshots/rtl/compose.checkbox.BpkCheckboxTest_default.png
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ fun BpkCheckbox(
) {

BpkCheckboxImpl(
modifier = Modifier.padding(end = BpkSpacing.Sm),
modifier = Modifier.padding(end = BpkSpacing.Md),
state = state,
enabled = enabled,
interactionSource = interactionSource,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ fun BpkRadioButton(

Row(
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(BpkDimension.Spacing.Sm),
horizontalArrangement = Arrangement.spacedBy(BpkDimension.Spacing.Md),
modifier = modifier.applyIf(onClick != null) {
selectable(
selected = selected,
Expand Down
Binary file modified docs/compose/Checkbox/screenshots/default.png
Binary file modified docs/compose/Checkbox/screenshots/default_dm.png
Binary file modified docs/compose/RadioButton/screenshots/default.png
Binary file modified docs/compose/RadioButton/screenshots/default_dm.png
Binary file modified docs/view/Checkbox/screenshots/default.png
Binary file modified docs/view/Checkbox/screenshots/default_dm.png
Binary file modified docs/view/RadioButton/screenshots/default.png
Binary file modified docs/view/RadioButton/screenshots/default_dm.png

0 comments on commit 0ccbcc4

Please sign in to comment.