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

Commit 55feab47 authored by Romain Hunault's avatar Romain Hunault 🚴🏻
Browse files

Merge branch 'fix-small-icons' into 'master'

Fix small icons issue on moto G7

See merge request e/apps/BlissLauncher!47
parents 6c2b9e60 72167507
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -44,6 +44,8 @@ build/
.idea/modules.xml
.idea/modules.xml
.idea/assetWizardSettings.xml
.idea/assetWizardSettings.xml
.idea/markdown-navigator*
.idea/markdown-navigator*
.idea/compiler.xml
.idea/jarRepositories.xml
projectFilesBackup/
projectFilesBackup/


gradle.xml
gradle.xml
+13 −4
Original line number Original line Diff line number Diff line
<component name="ProjectCodeStyleConfiguration">
<component name="ProjectCodeStyleConfiguration">
  <code_scheme name="Project" version="173">
  <code_scheme name="Project" version="173">
    <AndroidXmlCodeStyleSettings>
      <option name="ARRANGEMENT_SETTINGS_MIGRATED_TO_191" value="true" />
    </AndroidXmlCodeStyleSettings>
    <JetCodeStyleSettings>
    <JetCodeStyleSettings>
      <option name="PACKAGES_TO_USE_STAR_IMPORTS">
      <option name="PACKAGES_TO_USE_STAR_IMPORTS">
        <value>
        <value>
          <package name="kotlinx.android.synthetic" withSubpackages="true" static="false" />
          <package name="kotlinx.android.synthetic" alias="false" withSubpackages="true" />
        </value>
      </option>
      <option name="PACKAGES_IMPORT_LAYOUT">
        <value>
          <package name="" alias="false" withSubpackages="true" />
          <package name="java" alias="false" withSubpackages="true" />
          <package name="javax" alias="false" withSubpackages="true" />
          <package name="kotlin" alias="false" withSubpackages="true" />
          <package name="" alias="true" withSubpackages="true" />
        </value>
        </value>
      </option>
      </option>
      <option name="NAME_COUNT_TO_USE_STAR_IMPORT" value="2147483647" />
      <option name="NAME_COUNT_TO_USE_STAR_IMPORT" value="2147483647" />
      <option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
      <option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
    </JetCodeStyleSettings>
    </JetCodeStyleSettings>
    <MarkdownNavigatorCodeStyleSettings>
      <option name="RIGHT_MARGIN" value="72" />
    </MarkdownNavigatorCodeStyleSettings>
    <XML>
    <XML>
      <option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
      <option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
    </XML>
    </XML>
+1 −1
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<project version="4">
  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
</project>
</project>
 No newline at end of file
+3 −10
Original line number Original line Diff line number Diff line
@@ -10,7 +10,6 @@ import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.RectF;
import android.util.DisplayMetrics;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.Display;
import android.view.Display;
import android.view.WindowManager;
import android.view.WindowManager;


@@ -158,8 +157,8 @@ public class DeviceProfile {
        display.getRealSize(realSize);
        display.getRealSize(realSize);


        widthPx = realSize.x;
        widthPx = realSize.x;
        double x = widthPx / dm.xdpi;
        double x = widthPx / dm.densityDpi;
        ratio = dm.densityDpi / dm.xdpi;
        ratio = (float) dm.densityDpi / dm.xdpi;
        widthCm = (float) (x * 2.540001f);
        widthCm = (float) (x * 2.540001f);
        heightPx = realSize.y;
        heightPx = realSize.y;


@@ -237,13 +236,7 @@ public class DeviceProfile {
        float a = 1.578f;
        float a = 1.578f;
        float b = 1.23f;
        float b = 1.23f;


        Log.i(TAG, "updateIconSize: " + (int) a + " " + (int) b);
        iconSizePx = (int) (0.75 * widthPx / widthCm);

        iconSizePx = (int) (widthPx / widthCm);
        if (ratio >= 1) {
            iconSizePx = iconSizePx * (int) ratio;
        }

        iconTextSizePx = (int) (Utilities.pxFromSp(12, dm) * scale);
        iconTextSizePx = (int) (Utilities.pxFromSp(12, dm) * scale);
        iconDrawablePaddingPx = (availableWidthPx - iconSizePx * 4) / 5;
        iconDrawablePaddingPx = (availableWidthPx - iconSizePx * 4) / 5;