| Summary: | [Perspectives] No way to influence the SWT Style bits of a Window | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Jonas Helming <jhelming> |
| Component: | UI | Assignee: | Platform UI Triaged <platform-ui-triaged> |
| Status: | CLOSED DUPLICATE | QA Contact: | Eric Moffatt <emoffatt> |
| Severity: | normal | ||
| Priority: | P3 | CC: | bsd, emoffatt, Lars.Vogel, matthias.flock, pwebster |
| Version: | 4.3 | Keywords: | helpwanted |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Jonas Helming
Which do you think would be better ? Since we can 'query' our CSS engine it's technically feasible to do this through CSS even though it's not directly supportable in SWT (we wouldn't even have to expose the 'bits', we can create custom 'attributes' associated the Window's CSS such as 'sizable=false'...) We could also do the same thing through tags of course... Hmm, since this is more related to the functionality of the window than to the "style" i think it would be more consistent to do it with tags. We already have tags for parts for "non-maximizable" etc. The tags represent state, which changes over the lifetime of the window. The style bits don't change, and so might be better to be expressed as CSS. Brian, I agree with that. Actually the style bits can change, because you can change the whole theme of the application. Changes to the shell style won't be updated then without rebuilding the UI because the shell style can only be set on creation of the shell. Probably the MWindow model should have special attributes for this, like Parts have with the "closeable" checkbox. Just an observation on the last comment. It turns out that the IDE can't actually use the 'closeable' attribute since it's an attribute of an MPart. The IDE allows you to have a view that's closeable in one perspective but not in different one so we have to use the IPresentationEngine#NO_CLOSE tag on the MPlaceholders instead. I'll tag this one for work in M3 since it's pretty self-contained. At this point based on the comments we'll go with the CSS approach, agreed ? BTW, one thing that would be nice is a definitive list of *which* attributes you want to control. We already mention 'close' and 'size', do we also want to limit the shell's size... ? Menu bar, please. To be shown/hidden by tapping Alt-key. (In reply to Timo Kinnunen from comment #8) > Menu bar, please. To be shown/hidden by tapping Alt-key. ? That's not related to the style bits (trim, close, minimize, maximize, etc). PW (In reply to comment #9) > ? That's not related to the style bits (trim, close, minimize, maximize, etc). I admit I haven't looked into the the code itself to see how the menu bar works, just that poking around in CSS Spy I see Shells having style bits like SWT.TITLE, SWT.CLOSE, SWT.MENU, SWT.MAX, SWT.BORDER and with the menu bar non-responsive to inspecting its CSS, it seemed like something that should work but wasn't yet implemented. What's the real story on customizing menu bar visibility? for me the priority would be CLOSE, MIN, MAX, TITLE, ON_TOP and less important: BORDER, NO_TRIM, RESIZE About the issue of changes at runtime: I think that this is the case for both, styling an model properties, expect you would be the model attributes unchangable... M4 is done... I'll mark this as a DUP, I'll be committing the code against the other defect... *** This bug has been marked as a duplicate of bug 398027 *** |