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

Commit e6a9d1f6 authored by Steve Kondik's avatar Steve Kondik Committed by Gerrit Code Review
Browse files

Merge "Add configurable offset for drawing time label on Lense unlock screen" into gingerbread

parents f75c9f11 3a752b23
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -456,11 +456,14 @@ public class RotarySelector extends View {
                    mTimeString=mTime.format("%l:%M %P");
                String mDate=(String) DateFormat.format(mDateFormatString, new Date());

                //Add offset specified in config file
                int customTimeOffset = getContext().getResources().getInteger(R.integer.config_lenseTimeLabelOffsetDIP);

                canvas.translate(0, 0);
                mLensePaint.setTextSize(LENSE_TIME_SIZE_DIP * mDensity * mDensityScaleFactor);
                canvas.drawText(mTimeString, mBackgroundWidth / 2 * mDensityScaleFactor, mRotaryOffsetY + mMarginBottom + LENSE_TIME_SIZE_DIP * mDensity, mLensePaint);
                canvas.drawText(mTimeString, mBackgroundWidth / 2 * mDensityScaleFactor, mRotaryOffsetY + mMarginBottom + LENSE_TIME_SIZE_DIP * mDensity + customTimeOffset, mLensePaint);
                mLensePaint.setTextSize(LENSE_DATE_SIZE_DIP * mDensity * mDensityScaleFactor);
                canvas.drawText(mDate, mBackgroundWidth / 2 * mDensityScaleFactor, mRotaryOffsetY + mMarginBottom + LENSE_DATE_SIZE_DIP * mDensity * 3, mLensePaint);
                canvas.drawText(mDate, mBackgroundWidth / 2 * mDensityScaleFactor, mRotaryOffsetY + mMarginBottom + LENSE_DATE_SIZE_DIP * mDensity * 3 + customTimeOffset, mLensePaint);
            }
            return;
        }
+3 −0
Original line number Diff line number Diff line
@@ -404,6 +404,9 @@
    <!-- Configure rotary stroke width -->
    <integer name="config_rotaryStrokeWidthDIP">83</integer>

    <!-- Configure lense unlock time label offset -->
    <integer name="config_lenseTimeLabelOffsetDIP">0</integer>

    <!-- Do not translate. Defines the slots is Two Digit Number for dialing normally not USSD -->
    <string-array name="config_twoDigitNumberPattern">
    </string-array>