Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2021-11-25 18:53:44 +0300
committerJulian Eisel <julian@blender.org>2021-11-25 19:09:45 +0300
commit5514ca58a4d4e03d9062bc479488faca7e577677 (patch)
tree7d3996161a38020c78d2f2bd198d42d8c1c976a9 /source/blender/editors/interface/interface.c
parent94e8db1e869d8209599f1a40b0e1a25c056d077a (diff)
Fix T92313: Heading of redo panel is not aligned properly
This corrects some alignments issues through new margins introduced in 93544b641bd6. Basic idea of this fix is to only add the new margins when drawing a panel with background. These margins were added specifically for the background boxes, so that makes sense. Alternative fix to D13199. This also fixes some margings added unintentionally in mentioned commit. There is a little jump of the toolbar and the tabs in the Properties when comparing the UI without this fix to 2.93: {F12158085} {F12158039} The jump is gone with this fix applied (compare to the 2.93 screenshot): {F12158064} While not a serious issue, this confirms that this fix actually tackles the root of the issue.
Diffstat (limited to 'source/blender/editors/interface/interface.c')
-rw-r--r--source/blender/editors/interface/interface.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 6ad0ef9de18..c5ccdbaac3b 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -2075,24 +2075,11 @@ void UI_block_draw(const bContext *C, uiBlock *block)
ui_draw_menu_back(&style, block, &rect);
}
else if (block->panel) {
- bool show_background = region->alignment != RGN_ALIGN_FLOAT;
- if (show_background) {
- if (block->panel->type && (block->panel->type->flag & PANEL_TYPE_NO_HEADER)) {
- if (region->regiontype == RGN_TYPE_TOOLS) {
- /* We never want a background around active tools. */
- show_background = false;
- }
- else {
- /* Without a header there is no background except for region overlap. */
- show_background = region->overlap != 0;
- }
- }
- }
ui_draw_aligned_panel(&style,
block,
&rect,
UI_panel_category_is_visible(region),
- show_background,
+ UI_panel_should_show_background(region, block->panel->type),
region->flag & RGN_FLAG_SEARCH_FILTER_ACTIVE);
}