[Bf-blender-cvs] [cddab65] UI-graphical-redesign: Increase default DPI to 78, decrease default font sizes to 10
Julian Eisel
noreply at git.blender.org
Tue Jun 2 20:11:18 CEST 2015
Commit: cddab657e8a9125e97dfcd81c21179757a35aa07
Author: Julian Eisel
Date: Tue Jun 2 20:04:36 2015 +0200
Branches: UI-graphical-redesign
https://developer.blender.org/rBcddab657e8a9125e97dfcd81c21179757a35aa07
Increase default DPI to 78, decrease default font sizes to 10
NOTE: These changes might be controversial, but it's a good chance to
test this.
Also further changes to default font drawing plus a bit of cleanup.
===================================================================
M source/blender/blenloader/intern/versioning_defaults.c
M source/blender/editors/interface/resources.c
===================================================================
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index 045f422..7015d66 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -48,10 +48,35 @@
/**
+ * Override theme options in startup.blend
+ */
+static void update_defaults_themes(void)
+{
+ bTheme *btheme;
+ ThemeSpace *ts;
+ uiWidgetColors *wcol;
+
+ for (btheme = U.themes.first; btheme; btheme = btheme->next) {
+ for (wcol = UI_THEMEWIDGETS_START(&btheme->tui); wcol != UI_THEMEWIDGETS_END(&btheme->tui); wcol++) {
+ wcol->shaded = 0;
+ }
+
+ for (ts = UI_THEMESPACE_START(btheme); ts != UI_THEMESPACE_END(btheme); ts++) {
+ /* XXX maybe remove show_back/show_header options? */
+ ts->panelcolors.show_back = ts->panelcolors.show_header = true;
+ rgba_char_args_set(ts->panelcolors.back, 128, 128, 128, 255);
+ rgba_char_args_set(ts->panelcolors.header, 97, 97, 97, 255);
+ }
+ }
+}
+
+/**
* Override values in in-memory startup.blend, avoids resaving for small changes.
*/
void BLO_update_defaults_userpref_blend(void)
{
+ uiStyle *style;
+
/* defaults from T37518 */
U.uiflag |= USER_ZBUF_CURSOR;
@@ -60,6 +85,18 @@ void BLO_update_defaults_userpref_blend(void)
U.versions = 1;
U.savetime = 2;
+
+ U.dpi = 78;
+
+ for (style = U.uistyles.first; style; style = style->next) {
+ style->paneltitle.points = style->widgetlabel.points = style->widget.points = 10;
+ style->paneltitle.shadx = 1;
+ style->paneltitle.shady = -1;
+ style->paneltitle.shadowalpha = 0.1f;
+ style->paneltitle.shadowcolor = 0.0f;
+ }
+
+ update_defaults_themes();
}
/**
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index 8ac708f..626df74 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -2641,8 +2641,6 @@ void init_userdef_do_versions(void)
if (U.versionfile < 274 || (U.versionfile == 274 && U.subversionfile < 6)) {
bTheme *btheme;
- ThemeSpace *ts;
- uiWidgetColors *wcol;
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
btheme->tui.wcol_box.roundness = 0.2f;
@@ -2662,17 +2660,6 @@ void init_userdef_do_versions(void)
btheme->tui.wcol_toggle.roundness = 0.2f;
btheme->tui.wcol_tool.roundness = 0.25f;
btheme->tui.wcol_tooltip.roundness = 0.2f;
-
- for (wcol = UI_THEMEWIDGETS_START(&btheme->tui); wcol != UI_THEMEWIDGETS_END(&btheme->tui); wcol++) {
- wcol->shaded = 0;
- }
-
- for (ts = UI_THEMESPACE_START(btheme); ts != UI_THEMESPACE_END(btheme); ts++) {
- /* XXX maybe remove show_back/show_header options? */
- ts->panelcolors.show_back = ts->panelcolors.show_header = true;
- rgba_char_args_set(ts->panelcolors.back, 128, 128, 128, 255);
- rgba_char_args_set(ts->panelcolors.header, 97, 97, 97, 255);
- }
}
}
More information about the Bf-blender-cvs
mailing list