Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7db9d7c5 authored by Wolfram Liebchen's avatar Wolfram Liebchen Committed by Bruno Martins
Browse files

StatusBarSettings: Correct clock position setting label in RTL

If the device is set to RTL (right-to-left), then the statusbar clock
settings say "left" and mean "right" and vice versa.

Only the label texts should be swapped in RTL, not the item IDs, because
the items have "end/center/start" semantics and not "right/center/left".

Change-Id: I436ae7e162d0f00873090143822a5c69a35d2e06
parent f893daa5
Loading
Loading
Loading
Loading
+1 −12
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2012-2015 The CyanogenMod Project
                   2017-2022 The LineageOS Project
                   2017-2023 The LineageOS Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
@@ -199,12 +199,6 @@
        <item>2</item>
    </string-array>

    <string-array name="status_bar_clock_position_values_rtl" translatable="false">
        <item>2</item>
        <item>1</item>
        <item>0</item>
    </string-array>

    <string-array name="status_bar_clock_position_entries_notch" translatable="false">
        <item>@string/status_bar_clock_position_right</item>
        <item>@string/status_bar_clock_position_left</item>
@@ -220,11 +214,6 @@
        <item>2</item>
    </string-array>

    <string-array name="status_bar_clock_position_values_notch_rtl" translatable="false">
        <item>2</item>
        <item>0</item>
    </string-array>

    <string-array name="status_bar_am_pm_entries" translatable="false">
        <item>@string/status_bar_am_pm_normal</item>
        <item>@string/status_bar_am_pm_small</item>
+3 −3
Original line number Diff line number Diff line
/*
 * Copyright (C) 2014-2015 The CyanogenMod Project
 *               2017-2022 The LineageOS Project
 *               2017-2023 The LineageOS Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
@@ -133,10 +133,10 @@ public class StatusBarSettings extends SettingsPreferenceFragment
        if (getResources().getConfiguration().getLayoutDirection() == View.LAYOUT_DIRECTION_RTL) {
            if (disallowCenteredClock) {
                mStatusBarClock.setEntries(R.array.status_bar_clock_position_entries_notch_rtl);
                mStatusBarClock.setEntryValues(R.array.status_bar_clock_position_values_notch_rtl);
                mStatusBarClock.setEntryValues(R.array.status_bar_clock_position_values_notch);
            } else {
                mStatusBarClock.setEntries(R.array.status_bar_clock_position_entries_rtl);
                mStatusBarClock.setEntryValues(R.array.status_bar_clock_position_values_rtl);
                mStatusBarClock.setEntryValues(R.array.status_bar_clock_position_values);
            }
            mQuickPulldown.setEntries(R.array.status_bar_quick_qs_pulldown_entries_rtl);
            mQuickPulldown.setEntryValues(R.array.status_bar_quick_qs_pulldown_values_rtl);