Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
e
os
BlissLauncher
Commits
72167507
Commit
72167507
authored
Oct 27, 2020
by
Amit Kumar
💻
Browse files
Use densityDpi instead of xdpi for icon sizes
parent
6c2b9e60
Pipeline
#81050
passed with stage
in 6 minutes and 18 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
72167507
...
...
@@ -44,6 +44,8 @@ build/
.idea/modules.xml
.idea/assetWizardSettings.xml
.idea/markdown-navigator*
.idea/compiler.xml
.idea/jarRepositories.xml
projectFilesBackup/
gradle.xml
...
...
.idea/codeStyles/Project.xml
View file @
72167507
<component
name=
"ProjectCodeStyleConfiguration"
>
<code_scheme
name=
"Project"
version=
"173"
>
<AndroidXmlCodeStyleSettings>
<option
name=
"ARRANGEMENT_SETTINGS_MIGRATED_TO_191"
value=
"true"
/>
</AndroidXmlCodeStyleSettings>
<JetCodeStyleSettings>
<option
name=
"PACKAGES_TO_USE_STAR_IMPORTS"
>
<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>
</option>
<option
name=
"NAME_COUNT_TO_USE_STAR_IMPORT"
value=
"2147483647"
/>
<option
name=
"CODE_STYLE_DEFAULTS"
value=
"KOTLIN_OFFICIAL"
/>
</JetCodeStyleSettings>
<MarkdownNavigatorCodeStyleSettings>
<option
name=
"RIGHT_MARGIN"
value=
"72"
/>
</MarkdownNavigatorCodeStyleSettings>
<XML>
<option
name=
"XML_LEGACY_SETTINGS_IMPORTED"
value=
"true"
/>
</XML>
...
...
.idea/misc.xml
View file @
72167507
<?xml version="1.0" encoding="UTF-8"?>
<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>
\ No newline at end of file
app/src/main/java/foundation/e/blisslauncher/core/DeviceProfile.java
View file @
72167507
...
...
@@ -10,7 +10,6 @@ import android.graphics.Point;
import
android.graphics.Rect
;
import
android.graphics.RectF
;
import
android.util.DisplayMetrics
;
import
android.util.Log
;
import
android.view.Display
;
import
android.view.WindowManager
;
...
...
@@ -158,8 +157,8 @@ public class DeviceProfile {
display
.
getRealSize
(
realSize
);
widthPx
=
realSize
.
x
;
double
x
=
widthPx
/
dm
.
x
dpi
;
ratio
=
dm
.
densityDpi
/
dm
.
xdpi
;
double
x
=
widthPx
/
dm
.
d
ensityD
pi
;
ratio
=
(
float
)
dm
.
densityDpi
/
dm
.
xdpi
;
widthCm
=
(
float
)
(
x
*
2.540001f
);
heightPx
=
realSize
.
y
;
...
...
@@ -237,13 +236,7 @@ public class DeviceProfile {
float
a
=
1.578f
;
float
b
=
1.23f
;
Log
.
i
(
TAG
,
"updateIconSize: "
+
(
int
)
a
+
" "
+
(
int
)
b
);
iconSizePx
=
(
int
)
(
widthPx
/
widthCm
);
if
(
ratio
>=
1
)
{
iconSizePx
=
iconSizePx
*
(
int
)
ratio
;
}
iconSizePx
=
(
int
)
(
0.75
*
widthPx
/
widthCm
);
iconTextSizePx
=
(
int
)
(
Utilities
.
pxFromSp
(
12
,
dm
)
*
scale
);
iconDrawablePaddingPx
=
(
availableWidthPx
-
iconSizePx
*
4
)
/
5
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment