Initialize and use the theme for metadata text
This commit is contained in:
parent
58c511fb01
commit
e1ce83f762
|
@ -42,7 +42,7 @@ extern "C" {
|
|||
* and keep comment above the defines.
|
||||
* Use STRINGIFY() rather than defining with quotes */
|
||||
#define BLENDER_VERSION 274
|
||||
#define BLENDER_SUBVERSION 4
|
||||
#define BLENDER_SUBVERSION 5
|
||||
/* Several breakages with 270, e.g. constraint deg vs rad */
|
||||
#define BLENDER_MINVERSION 270
|
||||
#define BLENDER_MINSUBVERSION 5
|
||||
|
|
|
@ -2609,6 +2609,15 @@ void init_userdef_do_versions(void)
|
|||
cp[3] = 255;
|
||||
}
|
||||
}
|
||||
|
||||
if (U.versionfile < 274 || (U.versionfile == 274 && U.subversionfile < 5)) {
|
||||
bTheme *btheme;
|
||||
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
|
||||
copy_v4_v4_char(btheme->tima.metadatatext, btheme->tima.text_hi);
|
||||
copy_v4_v4_char(btheme->tseq.metadatatext, btheme->tseq.text_hi);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (U.pixelsize == 0.0f)
|
||||
U.pixelsize = 1.0f;
|
||||
|
|
|
@ -2197,7 +2197,7 @@ void ED_region_image_metadata_draw(ARegion *ar, ImBuf *ibuf, float zoomx, float
|
|||
BLF_clipping(fontid, rect.xmin, rect.ymin, rect.xmax, rect.ymax);
|
||||
BLF_enable(fontid, BLF_CLIPPING);
|
||||
|
||||
UI_ThemeColor(TH_TEXT_HI);
|
||||
UI_ThemeColor(TH_METADATA_TEXT);
|
||||
metadata_draw_imbuf(ibuf, rect, fontid, true, zoomy);
|
||||
|
||||
BLF_disable(fontid, BLF_CLIPPING);
|
||||
|
@ -2219,7 +2219,7 @@ void ED_region_image_metadata_draw(ARegion *ar, ImBuf *ibuf, float zoomx, float
|
|||
BLF_clipping(fontid, rect.xmin, rect.ymin, rect.xmax, rect.ymax);
|
||||
BLF_enable(fontid, BLF_CLIPPING);
|
||||
|
||||
UI_ThemeColor(TH_TEXT_HI);
|
||||
UI_ThemeColor(TH_METADATA_TEXT);
|
||||
metadata_draw_imbuf(ibuf, rect, fontid, false, zoomy);
|
||||
|
||||
BLF_disable(fontid, BLF_CLIPPING);
|
||||
|
|
Loading…
Reference in New Issue