Skip to content

Commit

Permalink
Fix dark mode for external billing icon (APPS-1786) (#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabtron authored Sep 17, 2024
1 parent 8ff3dbf commit 5433a09
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
### Removed
### Fixed
* ui: subject dialog for external billing now works in dark mode
* ui: external billing icon works with dark mode now

## [0.75.7]
### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public void onChanged() {
entries.add(new Entry(pm, R.drawable.snabble_ic_payment_select_tegut, pm.getObfuscatedId()));
break;
case EXTERNAL_BILLING:
entries.add(new Entry(pm, R.drawable.ic_snabble_external_billing, pm.getObfuscatedId()));
entries.add(new Entry(pm, R.drawable.snabble_ic_external_billing, pm.getObfuscatedId()));
break;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ val PaymentMethodDescriptor.icon: Int
PaymentMethod.GOOGLE_PAY.id -> R.drawable.snabble_ic_payment_select_gpay
"externalBilling" -> when (acceptedOriginTypes?.first()) {
"tegutEmployeeID" -> R.drawable.snabble_ic_payment_select_tegut
"contactPersonCredentials" -> R.drawable.ic_snabble_external_billing
"contactPersonCredentials" -> R.drawable.snabble_ic_external_billing
else -> 0
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import io.snabble.sdk.PaymentMethod.QRCODE_POS
import io.snabble.sdk.PaymentMethod.TEGUT_EMPLOYEE_CARD
import io.snabble.sdk.PaymentMethod.TWINT
import io.snabble.sdk.PaymentMethod.VISA
import io.snabble.sdk.ui.R.drawable.ic_snabble_external_billing
import io.snabble.sdk.ui.R.drawable.snabble_ic_external_billing
import io.snabble.sdk.ui.R.drawable.snabble_ic_payment_giropay
import io.snabble.sdk.ui.R.drawable.snabble_ic_payment_select_amex
import io.snabble.sdk.ui.R.drawable.snabble_ic_payment_select_gpay
Expand Down Expand Up @@ -50,7 +50,7 @@ class PaymentMethodMetaDataHelper(
GIROPAY withMeta (Snabble_Giropay_title.resolved to snabble_ic_payment_giropay),
PAYONE_SEPA withMeta ("SEPA-Lastschrift" to snabble_ic_payment_select_sepa),
GATEKEEPER_TERMINAL withMeta (Snabble_Payment_payAtSCO.resolved to snabble_ic_payment_select_sco),
EXTERNAL_BILLING withMeta (Snabble_Payment_ExternalBilling_title.resolved to ic_snabble_external_billing),
EXTERNAL_BILLING withMeta (Snabble_Payment_ExternalBilling_title.resolved to snabble_ic_external_billing),
TEGUT_EMPLOYEE_CARD withMeta ("Tegut... Mitarbeiterkarte" to snabble_ic_payment_select_tegut),
CUSTOMERCARD_POS withMeta (Snabble_Payment_payAtCashDesk.resolved to snabble_ic_payment_select_pos),
QRCODE_POS withMeta (Snabble_Payment_payAtCashDesk.resolved to snabble_ic_payment_select_pos),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public void click() {

if (availablePaymentMethods.contains(PaymentMethod.EXTERNAL_BILLING)) {
entries.add(new SelectPaymentMethodFragment.Entry(
R.drawable.ic_snabble_external_billing,
R.drawable.snabble_ic_external_billing,
requireContext().getString(R.string.Snabble_Payment_ExternalBilling_title),
getUsableAtText(PaymentMethod.EXTERNAL_BILLING),
new OneShotClickListener() {
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
12 changes: 12 additions & 0 deletions ui/src/main/res/drawable/snabble_ic_external_billing.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="?attr/colorOnSurface"
android:viewportWidth="960"
android:viewportHeight="960">

<path
android:fillColor="@android:color/white"
android:pathData="M320,720L640,720L640,640L320,640L320,720ZM320,560L640,560L640,480L320,480L320,560ZM240,880Q207,880 183.5,856.5Q160,833 160,800L160,160Q160,127 183.5,103.5Q207,80 240,80L560,80L800,320L800,800Q800,833 776.5,856.5Q753,880 720,880L240,880ZM520,360L520,160L240,160Q240,160 240,160Q240,160 240,160L240,800Q240,800 240,800Q240,800 240,800L720,800Q720,800 720,800Q720,800 720,800L720,360L520,360ZM240,160L240,160L240,360L240,360L240,160L240,360L240,360L240,800Q240,800 240,800Q240,800 240,800L240,800Q240,800 240,800Q240,800 240,800L240,160Q240,160 240,160Q240,160 240,160Z" />

</vector>

0 comments on commit 5433a09

Please sign in to comment.