Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350238 - [Theming][Table] Table misses border-radius property
Summary: [Theming][Table] Table misses border-radius property
Status: RESOLVED DUPLICATE of bug 298745
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.5   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-24 07:45 EDT by Stephan Leicht Vogt CLA
Modified: 2011-07-13 05:09 EDT (History)
1 user (show)

See Also:


Attachments
Screenshot as described. (567 bytes, image/png)
2011-06-24 07:45 EDT, Stephan Leicht Vogt CLA
no flags Details
Screenshot as described in comment 2. (517 bytes, image/png)
2011-06-30 03:27 EDT, Stephan Leicht Vogt CLA
no flags Details
Screenshot: Padded Table (614 bytes, image/png)
2011-07-04 11:09 EDT, Stephan Leicht Vogt CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Leicht Vogt CLA 2011-06-24 07:45:03 EDT
Created attachment 198520 [details]
Screenshot as described.

If a Table is set into an Composite with border and border-radius the corners get little holes from the white table corners. See screenshot.

So we need to be able to give the table also a border-radius so the holes disappear.
Comment 1 Tim Buschtoens CLA 2011-06-26 10:04:47 EDT
Hm. Did you try setting the Tables background-color to transparent and setting the desired background-color on the composite instead? This might solve your problem.

Introducing border-radius will only shift the problem since the tables content will then do the same thing to the table (overlap with the corners) as the Table now does to the composite. We would have to add rounded borders to TableColumn, TableRows and the Tables ScrollBars also.
Comment 2 Stephan Leicht Vogt CLA 2011-06-30 03:27:44 EDT
Created attachment 198877 [details]
Screenshot as described in comment 2.
Comment 3 Stephan Leicht Vogt CLA 2011-06-30 03:30:22 EDT
(In reply to comment #1)
> Hm. Did you try setting the Tables background-color to transparent and setting
> the desired background-color on the composite instead? This might solve your
> problem.

I tried that but with no great effect (see second screenshot).

> Introducing border-radius will only shift the problem since the tables content
> will then do the same thing to the table (overlap with the corners) as the
> Table now does to the composite. We would have to add rounded borders to
> TableColumn, TableRows and the Tables ScrollBars also.

I see your point. But how could I solve the problem of this "holes"? How did others solve this or am I the first to use round corners with tables?
Comment 4 Ralf Sternberg CLA 2011-07-04 10:47:46 EDT
The problem described in comment 0 (rounded corners with overlapping rectangular content) can not be solved in RAP (at least not currently).
In some browsers, the rounded borders have still to be implemented using vector-graphics which cannot be used for clipping (Tim, correct me if I'm wrong).

Consequently, the application programmer has to make sure that the content cannot overlap the rounded borders by applying a suitable padding. In your case, I'd suggest to try a padding (e.g. padding: 0 2px;) to the surrounding Composite.
Comment 5 Stephan Leicht Vogt CLA 2011-07-04 11:09:01 EDT
Created attachment 199055 [details]
Screenshot: Padded Table

Hi Ralf, thanks for your suggestion. I added padding: 1px 1px; to the surrounding composite. You can see the result in the screenshot. It worked for three corners. Somehow the upper-left corner is has still overlapping - even if the padding is 5px.
Eventually this is a bug in the padding. If you look closely you can see, that the right side isn't padded.
Comment 6 Ralf Sternberg CLA 2011-07-04 11:20:46 EDT
(In reply to comment #5)
Did you use a layout or absolute positioning? Could you file a separate bug with an SWT snippet and your CSS?
Comment 7 Ralf Sternberg CLA 2011-07-04 11:28:14 EDT
Tim just confirmed that rounded borders can not be made to clip contents as long as we have to support browsers without CSS-3 features, namely IE versions < 9.

If we would add border-radius to Tree and Table, we would also have to add the padding property. This would at least save the surrounding composite. Thoughts?
Comment 8 Stephan Leicht Vogt CLA 2011-07-06 08:19:01 EDT
(In reply to comment #6)
> (In reply to comment #5)
> Did you use a layout or absolute positioning? Could you file a separate bug
> with an SWT snippet and your CSS?

Ok, with a simple snippet the padding is correct. It seems that the problem is in our code. No need for a padding-ticket.
Comment 9 Ralf Sternberg CLA 2011-07-06 18:01:18 EDT
I still tend to support border-radius and padding as this would spare the surrounding composite.
Comment 10 Ivan Furnadjiev CLA 2011-07-11 06:04:52 EDT
(In reply to comment #9)
This bug is a duplicate of bug 298745. Several months ago I spent couple of days trying to implement the border-radius and padding property on Table together with correctly positioning of cell editors. The old client side Table widget made the implementation very complicated and we (with Ruediger) decided not to implement it, but to introduce a padding property on Composite for easy workaround it. Maybe with the new Tree/Table client-side widget it will be easy (or not).
Comment 11 Ralf Sternberg CLA 2011-07-13 05:09:19 EDT
(In reply to comment #10)
Ok, I overlooked this complexity in the Table implementation. But of cause, a padding on the Table would affect all size computation, including item metrics. In this case, I agree that we can't do this now. Closing as dup.

*** This bug has been marked as a duplicate of bug 298745 ***