Skip to content

Skip gradient image for flat look in FormHeading and CSS handler#3808

Draft
vogella wants to merge 2 commits intoeclipse-platform:masterfrom
vogella:flat-forms-level1-level4
Draft

Skip gradient image for flat look in FormHeading and CSS handler#3808
vogella wants to merge 2 commits intoeclipse-platform:masterfrom
vogella:flat-forms-level1-level4

Conversation

@vogella
Copy link
Contributor

@vogella vogella commented Mar 20, 2026

Summary

  • FormHeading (setTextBackground): Detect when all gradient colors are identical and use setBackground(color) instead of generating a gradient image via FormImages. This avoids unnecessary Image allocation and GC rendering for flat themes.
  • CSSPropertyFormHandler: Simplify identical-color gradient lists from CSS into a single-color array before passing to the form widget, preventing unnecessary gradient processing downstream.

These changes implement Levels 1 and 4 from #3803, complementing the Level 2/3 changes in #3807.

Fixes #3803

Test plan

  • Verify flat theme renders correctly with solid background (no gradient image created)
  • Verify gradient themes still render correctly with distinct colors
  • Verify CSS text-background-color with identical gradient stops uses solid background
  • Verify CSS text-background-color with distinct gradient stops still creates gradient

🤖 Generated with Claude Code

@eclipse-platform-bot
Copy link
Contributor

This pull request changes some projects for the first time in this development cycle.
Therefore the following files need a version increment:

bundles/org.eclipse.ui.forms/META-INF/MANIFEST.MF

An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch.

Git patch
From 02b42986fd5dbe0f2d3a2783c01646e42aca2c37 Mon Sep 17 00:00:00 2001
From: Eclipse Platform Bot <platform-bot@eclipse.org>
Date: Fri, 20 Mar 2026 13:54:30 +0000
Subject: [PATCH] Version bump(s) for 4.40 stream


diff --git a/bundles/org.eclipse.ui.forms/META-INF/MANIFEST.MF b/bundles/org.eclipse.ui.forms/META-INF/MANIFEST.MF
index 22e1a339c7..b17c669780 100644
--- a/bundles/org.eclipse.ui.forms/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.ui.forms/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %name
 Bundle-SymbolicName: org.eclipse.ui.forms;singleton:=true
-Bundle-Version: 3.14.0.qualifier
+Bundle-Version: 3.14.100.qualifier
 Bundle-Vendor: %provider-name
 Bundle-Localization: plugin
 Export-Package: org.eclipse.ui.forms,
-- 
2.53.0

Further information are available in Common Build Issues - Missing version increments.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 20, 2026

Test Results

   852 files  ± 0     852 suites  ±0   56m 13s ⏱️ - 1m 41s
 7 873 tests + 6   7 630 ✅ + 6  243 💤 ±0  0 ❌ ±0 
20 145 runs  +18  19 489 ✅ +18  656 💤 ±0  0 ❌ ±0 

Results for commit 50e467e. ± Comparison against base commit 1446276.

♻️ This comment has been updated with latest results.

@vogella vogella force-pushed the flat-forms-level1-level4 branch from 54d9573 to 9cf24cd Compare March 23, 2026 14:12
@vogella
Copy link
Contributor Author

vogella commented Mar 23, 2026

Rebased onto eclipse/master and resolved merge conflicts in FlatLookTest.java. Fixed a bug in the FormHeading optimization where the background image wasn't being cleared correctly in all cases. Verified with mvn clean verify in forms test bundle.

vogella added 2 commits March 23, 2026 18:33
…andler

FormHeading.setTextBackground now detects when all gradient colors are
identical and uses a solid background instead of generating a gradient
image. This avoids unnecessary image allocation and rendering overhead
for flat themes.

CSSPropertyFormHandler now simplifies identical-color gradient lists
from CSS into a single-color array before passing to the form widget,
preventing unnecessary gradient processing downstream.

Fixes eclipse-platform#3803
Section.updateHeaderImage now detects when the gradient color equals
the title bar background and skips creating the gradient image
entirely. This avoids unnecessary image allocation and tiling for
flat themes where both CSS properties are set to the same value.
@vogella vogella force-pushed the flat-forms-level1-level4 branch from 9cf24cd to 50e467e Compare March 24, 2026 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Requirement: Support for Truly Flat Look in Eclipse Forms UI

2 participants