Hi Rachit, On 06/18/2013 03:03 PM, Rachit Jain wrote: > So my questions are as follows: > > 1. Why there are separate style sheets provided (e.g. defaultstyle, > defaultstyle-activetab, defaultstyle-tab) ? Or precisely why there is > hard-coding of expected names e.g. -activetab.qss and > defaultstyle-tab.qss etc.) These are not separate style sheets in a strict sense. Styling a MITK Workbench application requires a set of three files, the suffix "activetab" and "tab" is just a naming convention. The primary style sheet can be names anything you like and contains the overall styling. The style-sheet with the "activetab" suffix contains special styles for - well - the "active tabs" in the MITK Workbench. The "tab" style sheet contains the styles for "non-active" tabs (selected or unselected). Because the Workbench tabs can be in three states (unselected, selected, active (focused) ) these three states need/can be styled differently using the name-suffix (Qt style sheets provide no support for "tristate" tab styles).
> > 2. Why it is applied again and again. Setting it once would have the > same impact, right? Because Qt only supports "selected" and "unselected" tab styles. If the user activates a View (tab) in the Workbench, we visualize this tab differently from other tabs which might be "selected" (visible in the foreground) by applying the -activetab.qss stylesheet. > > Ideally, according to me the best design would be, MITK should have a > list (like a link list) of qss file (irrespective of the name of the > qss files) and it should apply this list once on the qApp. If any user > (like me), wishes to use my own style sheet, MITK should provide an > interface where I can set my list and MITK should iterate it and apply > them all in the same order I have provided my list. That interface is provided on the API level by IQtStyleManager and in the MITK Workbench in the Preferences dialog. Best, Sascha ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users
