| Summary: | [Theming][Table] Table misses border-radius property | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Stephan Leicht Vogt <stephan.leichtvogt> | ||||||||
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> | ||||||||
| Status: | RESOLVED DUPLICATE | QA Contact: | |||||||||
| Severity: | enhancement | ||||||||||
| Priority: | P3 | CC: | tbuschto | ||||||||
| Version: | 1.5 | ||||||||||
| Target Milestone: | --- | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | All | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
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. Created attachment 198877 [details] Screenshot as described in comment 2. (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? 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. 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.
(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? 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? (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. I still tend to support border-radius and padding as this would spare the surrounding composite. (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). (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 *** |
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.