Summary: | Separator (spacer) and lineseparator (splitter) are seen as one item | ||
---|---|---|---|
Product: | [Unmaintained] kdelibs | Reporter: | Karl Vogel <kvo--kde> |
Component: | kedittoolbar | Assignee: | David Faure <faure> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Karl Vogel
2003-12-15 21:07:08 UTC
For example, editing ui_standards.ui like this: <ToolBar name="mainToolBar"><text>Main Toolbar</text> <Action name="file_new"/> <Action name="file_open"/> <Action name="file_save"/> <Action name="file_print"/> <Action name="file_print_preview"/> <Action name="file_mail"/> <Separator lineseparator="true"/> <Action name="edit_undo"/> <Action name="edit_redo"/> <Action name="edit_cut"/> <Action name="edit_copy"/> <Action name="edit_paste"/> <Separator lineseparator="true"/> <Action name="edit_find"/> <Action name="view_zoom"/> <Separator lineseparator="true"/> <Action name="go_previous"/> <Action name="go_next"/> <Action name="go_home"/> <Separator lineseparator="true"/> <MergeLocal/> <Action name="help"/> </ToolBar> Will give clean line separators on most toolbars (make those gnome HIG fans happy :) Oops.. spamming the bug system.. but.. If the application doesn't use the .ui system but instead handles the toolbar itself, then the only way to get the line based one is by editing the source code! int KToolBar::insertSeparator(int index, int id) int KToolBar::insertLineSeparator(int index, int id) Class reference: http://developer.kde.org/documentation/library/cvs-api/kdeui/html/classKToolBar.html#a13 Most applications that handle their toolbars themselves, use insertSeparator() which creates a KToolBarSeparator() that doesn't draw a line (line = false): 00170 void KToolBarSeparator::drawContents( QPainter* p ) 00171 { 00172 if ( line ) { 00173 QStyle::SFlags flags = QStyle::Style_Default; 00174 00175 if ( orientation() == Horizontal ) 00176 flags = flags | QStyle::Style_Horizontal; 00177 00178 style().drawPrimitive(QStyle::PE_DockWindowSeparator, p, 00179 contentsRect(), colorGroup(), flags); 00180 } else { 00181 QFrame::drawContents(p); 00182 } 00183 } Example: KATE, KWrite don't use .ui, so even after editing the .ui file, you don't get a line separator. KEdit does get a line separator after the edit. kate/kwrite defines the toolbar in its own kateui.rc / kwriteui.rc file. If you make the modification there it will work. Other than that it seems you would like to have the possibility to add "splitters" to toolbars in addition to "spacers" via the "Configure Toolbars" dialog. A valid point IMHO. AFAICS this has been implemented now in kedittoolbar. |