defaultSourceDPIInt 在 CodenameOne 的默认 theme.css
defaultSourceDPIInt in the default theme.css of CodenameOne
在新的 Codename One 基本项目 (https://start.codenameone.com/) 中,有一个默认的 theme.css
开头为:
#Constants {
includeNativeBool: true;
defaultSourceDPIInt: "0";
}
什么是defaultSourceDPIInt: "0";
?我在博客中找不到任何关于此的内容。
此处讨论:https://www.reddit.com/r/cn1/comments/p0utte/defaultsourcedpiint_css_theme_constant_can_make/
The defaultSourceDPIInt
constant which you can use as:
#Constants {
/* ... */
defaultSourceDPIInt: 0;
}
Sets the default DPI of images you use in the theme. This is very
important as the default is the creation of multi images. With 0 we're
essentially importing all images as regular images by default which
means you need to explicitly state the source DPI to prevent mistakes.
Check out the git commit for the full story:
https://github.com/codenameone/CodenameOne/commit/f31fb8a046759ed884ab61b2d34b42a614b2dbd2
在新的 Codename One 基本项目 (https://start.codenameone.com/) 中,有一个默认的 theme.css
开头为:
#Constants {
includeNativeBool: true;
defaultSourceDPIInt: "0";
}
什么是defaultSourceDPIInt: "0";
?我在博客中找不到任何关于此的内容。
此处讨论:https://www.reddit.com/r/cn1/comments/p0utte/defaultsourcedpiint_css_theme_constant_can_make/
The
defaultSourceDPIInt
constant which you can use as:
#Constants {
/* ... */
defaultSourceDPIInt: 0;
}
Sets the default DPI of images you use in the theme. This is very important as the default is the creation of multi images. With 0 we're essentially importing all images as regular images by default which means you need to explicitly state the source DPI to prevent mistakes. Check out the git commit for the full story: https://github.com/codenameone/CodenameOne/commit/f31fb8a046759ed884ab61b2d34b42a614b2dbd2