Changeset View
Changeset View
Standalone View
Standalone View
kstyle/widgets/menu.cpp
- This file was added.
1 | #include "breezestyle.h" | ||||
---|---|---|---|---|---|
2 | | ||||
3 | #include <QMenu> | ||||
4 | #include <QToolBar> | ||||
5 | #include <QWidgetAction> | ||||
6 | | ||||
7 | namespace Breeze | ||||
8 | { | ||||
9 | //______________________________________________________________________________ | ||||
10 | void Helper::renderMenuFrame(QPainter *painter, const QRect &rect, const QColor &color, const QColor &outline, bool roundCorners) const | ||||
11 | { | ||||
12 | // set brush | ||||
13 | if (color.isValid()) | ||||
14 | painter->setBrush(color); | ||||
15 | else | ||||
16 | painter->setBrush(Qt::NoBrush); | ||||
17 | | ||||
18 | if (roundCorners) { | ||||
19 | painter->setRenderHint(QPainter::Antialiasing); | ||||
20 | QRectF frameRect(rect); | ||||
21 | qreal radius(frameRadius()); | ||||
22 | | ||||
23 | // set pen | ||||
24 | if (outline.isValid()) { | ||||
25 | painter->setPen(outline); | ||||
26 | frameRect.adjust(0.5, 0.5, -0.5, -0.5); | ||||
27 | radius = qMax(radius - 1, qreal(0.0)); | ||||
28 | | ||||
29 | } else | ||||
30 | painter->setPen(Qt::NoPen); | ||||
31 | | ||||
32 | // render | ||||
33 | painter->drawRoundedRect(frameRect, radius, radius); | ||||
34 | | ||||
35 | } else { | ||||
36 | painter->setRenderHint(QPainter::Antialiasing, false); | ||||
37 | QRect frameRect(rect); | ||||
38 | if (outline.isValid()) { | ||||
39 | painter->setPen(outline); | ||||
40 | frameRect.adjust(0, 0, -1, -1); | ||||
41 | | ||||
42 | } else | ||||
43 | painter->setPen(Qt::NoPen); | ||||
44 | | ||||
45 | painter->drawRect(frameRect); | ||||
46 | } | ||||
47 | } | ||||
48 | | ||||
49 | //______________________________________________________________ | ||||
50 | QSize Style::menuItemSizeFromContents(const QStyleOption *option, const QSize &contentsSize, const QWidget *widget) const | ||||
51 | { | ||||
52 | // cast option and check | ||||
53 | const auto menuItemOption = qstyleoption_cast<const QStyleOptionMenuItem *>(option); | ||||
54 | if (!menuItemOption) | ||||
55 | return contentsSize; | ||||
56 | | ||||
57 | /* | ||||
58 | * First calculate the intrinsic size of the item. | ||||
59 | * this must be kept consistent with what's in drawMenuItemControl | ||||
60 | */ | ||||
61 | QSize size(contentsSize); | ||||
62 | switch (menuItemOption->menuItemType) { | ||||
63 | case QStyleOptionMenuItem::Normal: | ||||
64 | case QStyleOptionMenuItem::DefaultItem: | ||||
65 | case QStyleOptionMenuItem::SubMenu: { | ||||
66 | int iconWidth = 0; | ||||
67 | if (showIconsInMenuItems()) | ||||
68 | iconWidth = isQtQuickControl(option, widget) ? qMax(pixelMetric(PM_SmallIconSize, option, widget), menuItemOption->maxIconWidth) : menuItemOption->maxIconWidth; | ||||
69 | | ||||
70 | int leftColumnWidth = 0; | ||||
71 | | ||||
72 | // add icon width | ||||
73 | if (iconWidth > 0) { | ||||
74 | leftColumnWidth += iconWidth + Metrics::MenuItem_ItemSpacing; | ||||
75 | } | ||||
76 | | ||||
77 | // add checkbox indicator width | ||||
78 | if (menuItemOption->menuHasCheckableItems) { | ||||
79 | leftColumnWidth += Metrics::CheckBox_Size + Metrics::MenuItem_ItemSpacing; | ||||
80 | } | ||||
81 | | ||||
82 | // add spacing for accelerator | ||||
83 | /* | ||||
84 | * Note: | ||||
85 | * The width of the accelerator itself is not included here since | ||||
86 | * Qt will add that on separately after obtaining the | ||||
87 | * sizeFromContents() for each menu item in the menu to be shown | ||||
88 | * ( see QMenuPrivate::calcActionRects() ) | ||||
89 | */ | ||||
90 | const bool hasAccelerator(menuItemOption->text.indexOf(QLatin1Char('\t')) >= 0); | ||||
91 | if (hasAccelerator) | ||||
92 | size.rwidth() += Metrics::MenuItem_AcceleratorSpace; | ||||
93 | | ||||
94 | // right column | ||||
95 | const int rightColumnWidth = Metrics::MenuButton_IndicatorWidth + Metrics::MenuItem_ItemSpacing; | ||||
96 | size.rwidth() += leftColumnWidth + rightColumnWidth; | ||||
97 | | ||||
98 | // make sure height is large enough for icon and arrow | ||||
99 | size.setHeight(qMax(size.height(), int(Metrics::MenuButton_IndicatorWidth))); | ||||
100 | size.setHeight(qMax(size.height(), int(Metrics::CheckBox_Size))); | ||||
101 | size.setHeight(qMax(size.height(), iconWidth)); | ||||
102 | return expandSize(size, Metrics::MenuItem_MarginWidth, Metrics::MenuItem_MarginHeight); | ||||
103 | } | ||||
104 | | ||||
105 | case QStyleOptionMenuItem::Separator: { | ||||
106 | if (menuItemOption->text.isEmpty() && menuItemOption->icon.isNull()) { | ||||
107 | return expandSize(QSize(0, 1), Metrics::MenuItem_MarginWidth, Metrics::MenuItem_MarginHeight); | ||||
108 | | ||||
109 | } else { | ||||
110 | // build toolbutton option | ||||
111 | const QStyleOptionToolButton toolButtonOption(separatorMenuItemOption(menuItemOption, widget)); | ||||
112 | | ||||
113 | // make sure height is large enough for icon and text | ||||
114 | const int iconWidth(menuItemOption->maxIconWidth); | ||||
115 | const int textHeight(menuItemOption->fontMetrics.height()); | ||||
116 | if (!menuItemOption->icon.isNull()) | ||||
117 | size.setHeight(qMax(size.height(), iconWidth)); | ||||
118 | if (!menuItemOption->text.isEmpty()) { | ||||
119 | size.setHeight(qMax(size.height(), textHeight)); | ||||
120 | size.setWidth(qMax(size.width(), menuItemOption->fontMetrics.boundingRect(menuItemOption->text).width())); | ||||
121 | } | ||||
122 | | ||||
123 | return sizeFromContents(CT_ToolButton, &toolButtonOption, size, widget); | ||||
124 | } | ||||
125 | } | ||||
126 | | ||||
127 | // for all other cases, return input | ||||
128 | default: | ||||
129 | return contentsSize; | ||||
130 | } | ||||
131 | } | ||||
132 | | ||||
133 | //___________________________________________________________________________________ | ||||
134 | bool Style::drawFrameMenuPrimitive(const QStyleOption *option, QPainter *painter, const QWidget *widget) const | ||||
135 | { | ||||
136 | // only draw frame for (expanded) toolbars and QtQuick controls | ||||
137 | // do nothing for other cases, for which frame is rendered via drawPanelMenuPrimitive | ||||
138 | if (qobject_cast<const QToolBar *>(widget)) { | ||||
139 | const auto &palette(option->palette); | ||||
140 | const auto background(_helper->frameBackgroundColor(palette)); | ||||
141 | const auto outline(_helper->frameOutlineColor(palette)); | ||||
142 | | ||||
143 | const bool hasAlpha(_helper->hasAlphaChannel(widget)); | ||||
144 | _helper->renderMenuFrame(painter, option->rect, background, outline, hasAlpha); | ||||
145 | | ||||
146 | } else if (isQtQuickControl(option, widget)) { | ||||
147 | const auto &palette(option->palette); | ||||
148 | const auto background(_helper->frameBackgroundColor(palette)); | ||||
149 | const auto outline(_helper->frameOutlineColor(palette)); | ||||
150 | | ||||
151 | const bool hasAlpha(_helper->hasAlphaChannel(widget)); | ||||
152 | _helper->renderMenuFrame(painter, option->rect, background, outline, hasAlpha); | ||||
153 | } | ||||
154 | | ||||
155 | return true; | ||||
156 | } | ||||
157 | | ||||
158 | //___________________________________________________________________________________ | ||||
159 | bool Style::drawPanelMenuPrimitive(const QStyleOption *option, QPainter *painter, const QWidget *widget) const | ||||
160 | { | ||||
161 | /* | ||||
162 | * do nothing if menu is embedded in another widget | ||||
163 | * this corresponds to having a transparent background | ||||
164 | */ | ||||
165 | if (widget && !widget->isWindow()) | ||||
166 | return true; | ||||
167 | | ||||
168 | const auto &palette(option->palette); | ||||
169 | const auto outline(_helper->frameOutlineColor(palette)); | ||||
170 | const bool hasAlpha(_helper->hasAlphaChannel(widget)); | ||||
171 | auto background(_helper->frameBackgroundColor(palette)); | ||||
172 | | ||||
173 | #if !BREEZE_USE_KDE4 | ||||
174 | if (hasAlpha) { | ||||
175 | background.setAlphaF(StyleConfigData::menuOpacity() / 100.0); | ||||
176 | } | ||||
177 | #endif | ||||
178 | | ||||
179 | _helper->renderMenuFrame(painter, option->rect, background, outline, hasAlpha); | ||||
180 | | ||||
181 | return true; | ||||
182 | } | ||||
183 | | ||||
184 | //___________________________________________________________________________________ | ||||
185 | bool Style::drawMenuItemControl(const QStyleOption *option, QPainter *painter, const QWidget *widget) const | ||||
186 | { | ||||
187 | // cast option and check | ||||
188 | const auto menuItemOption = qstyleoption_cast<const QStyleOptionMenuItem *>(option); | ||||
189 | if (!menuItemOption) | ||||
190 | return true; | ||||
191 | if (menuItemOption->menuItemType == QStyleOptionMenuItem::EmptyArea) | ||||
192 | return true; | ||||
193 | | ||||
194 | // copy rect and palette | ||||
195 | const auto &rect(option->rect); | ||||
196 | const auto &palette(option->palette); | ||||
197 | | ||||
198 | // deal with separators | ||||
199 | if (menuItemOption->menuItemType == QStyleOptionMenuItem::Separator) { | ||||
200 | // normal separator | ||||
201 | if (menuItemOption->text.isEmpty() && menuItemOption->icon.isNull()) { | ||||
202 | const auto color(_helper->separatorColor(palette)); | ||||
203 | _helper->renderSeparator(painter, rect, color); | ||||
204 | return true; | ||||
205 | | ||||
206 | } else { | ||||
207 | /* | ||||
208 | * separator can have a title and an icon | ||||
209 | * in that case they are rendered as menu title buttons | ||||
210 | */ | ||||
211 | QStyleOptionToolButton copy(separatorMenuItemOption(menuItemOption, widget)); | ||||
212 | renderMenuTitle(©, painter, widget); | ||||
213 | | ||||
214 | return true; | ||||
215 | } | ||||
216 | } | ||||
217 | | ||||
218 | // store state | ||||
219 | const State &state(option->state); | ||||
220 | const bool enabled(state & State_Enabled); | ||||
221 | const bool selected(enabled && (state & State_Selected)); | ||||
222 | const bool sunken(enabled && (state & (State_On | State_Sunken))); | ||||
223 | const bool reverseLayout(option->direction == Qt::RightToLeft); | ||||
224 | const bool useStrongFocus(StyleConfigData::menuItemDrawStrongFocus()); | ||||
225 | | ||||
226 | // render hover and focus | ||||
227 | if (useStrongFocus && (selected || sunken)) { | ||||
228 | const auto color = _helper->focusColor(palette); | ||||
229 | const auto outlineColor = _helper->focusOutlineColor(palette); | ||||
230 | | ||||
231 | Sides sides = nullptr; | ||||
232 | if (!menuItemOption->menuRect.isNull()) { | ||||
233 | if (rect.top() <= menuItemOption->menuRect.top()) | ||||
234 | sides |= SideTop; | ||||
235 | if (rect.bottom() >= menuItemOption->menuRect.bottom()) | ||||
236 | sides |= SideBottom; | ||||
237 | if (rect.left() <= menuItemOption->menuRect.left()) | ||||
238 | sides |= SideLeft; | ||||
239 | if (rect.right() >= menuItemOption->menuRect.right()) | ||||
240 | sides |= SideRight; | ||||
241 | } | ||||
242 | | ||||
243 | _helper->renderFocusRect(painter, rect, color, outlineColor, sides); | ||||
244 | } | ||||
245 | | ||||
246 | // get rect available for contents | ||||
247 | auto contentsRect(insideMargin(rect, Metrics::MenuItem_MarginWidth, Metrics::MenuItem_MarginHeight)); | ||||
248 | | ||||
249 | // define relevant rectangles | ||||
250 | // checkbox | ||||
251 | QRect checkBoxRect; | ||||
252 | if (menuItemOption->menuHasCheckableItems) { | ||||
253 | checkBoxRect = QRect(contentsRect.left(), contentsRect.top() + (contentsRect.height() - Metrics::CheckBox_Size) / 2, Metrics::CheckBox_Size, Metrics::CheckBox_Size); | ||||
254 | contentsRect.setLeft(checkBoxRect.right() + Metrics::MenuItem_ItemSpacing + 1); | ||||
255 | } | ||||
256 | | ||||
257 | // render checkbox indicator | ||||
258 | if (menuItemOption->checkType == QStyleOptionMenuItem::NonExclusive) { | ||||
259 | checkBoxRect = visualRect(option, checkBoxRect); | ||||
260 | | ||||
261 | // checkbox state | ||||
262 | | ||||
263 | if (useStrongFocus && (selected || sunken)) { | ||||
264 | _helper->renderCheckBoxBackground(painter, checkBoxRect, palette.color(QPalette::Window), sunken); | ||||
265 | } | ||||
266 | | ||||
267 | CheckBoxState state(menuItemOption->checked ? CheckOn : CheckOff); | ||||
268 | const bool active(menuItemOption->checked); | ||||
269 | const auto shadow(_helper->shadowColor(palette)); | ||||
270 | const auto color(_helper->checkBoxIndicatorColor(palette, false, enabled && active)); | ||||
271 | _helper->renderCheckBox(painter, checkBoxRect, color, shadow, sunken, state); | ||||
272 | | ||||
273 | } else if (menuItemOption->checkType == QStyleOptionMenuItem::Exclusive) { | ||||
274 | checkBoxRect = visualRect(option, checkBoxRect); | ||||
275 | | ||||
276 | if (useStrongFocus && (selected || sunken)) { | ||||
277 | _helper->renderRadioButtonBackground(painter, checkBoxRect, palette.color(QPalette::Window), sunken); | ||||
278 | } | ||||
279 | | ||||
280 | const bool active(menuItemOption->checked); | ||||
281 | const auto shadow(_helper->shadowColor(palette)); | ||||
282 | const auto color(_helper->checkBoxIndicatorColor(palette, false, enabled && active)); | ||||
283 | _helper->renderRadioButton(painter, checkBoxRect, color, shadow, sunken, active ? RadioOn : RadioOff); | ||||
284 | } | ||||
285 | | ||||
286 | // icon | ||||
287 | int iconWidth = 0; | ||||
288 | const bool showIcon(showIconsInMenuItems()); | ||||
289 | if (showIcon) | ||||
290 | iconWidth = isQtQuickControl(option, widget) ? qMax(pixelMetric(PM_SmallIconSize, option, widget), menuItemOption->maxIconWidth) : menuItemOption->maxIconWidth; | ||||
291 | | ||||
292 | QRect iconRect; | ||||
293 | if (showIcon && iconWidth > 0) { | ||||
294 | iconRect = QRect(contentsRect.left(), contentsRect.top() + (contentsRect.height() - iconWidth) / 2, iconWidth, iconWidth); | ||||
295 | contentsRect.setLeft(iconRect.right() + Metrics::MenuItem_ItemSpacing + 1); | ||||
296 | const QSize iconSize(pixelMetric(PM_SmallIconSize, option, widget), pixelMetric(PM_SmallIconSize, option, widget)); | ||||
297 | iconRect = centerRect(iconRect, iconSize); | ||||
298 | } | ||||
299 | | ||||
300 | if (showIcon && !menuItemOption->icon.isNull()) { | ||||
301 | iconRect = visualRect(option, iconRect); | ||||
302 | | ||||
303 | // icon mode | ||||
304 | QIcon::Mode mode; | ||||
305 | if (selected && !useStrongFocus) | ||||
306 | mode = QIcon::Active; | ||||
307 | else if (selected) | ||||
308 | mode = QIcon::Selected; | ||||
309 | else if (enabled) | ||||
310 | mode = QIcon::Normal; | ||||
311 | else | ||||
312 | mode = QIcon::Disabled; | ||||
313 | | ||||
314 | // icon state | ||||
315 | const QIcon::State iconState(sunken ? QIcon::On : QIcon::Off); | ||||
316 | const QPixmap icon = menuItemOption->icon.pixmap(iconRect.size(), mode, iconState); | ||||
317 | painter->drawPixmap(iconRect, icon); | ||||
318 | } | ||||
319 | | ||||
320 | // arrow | ||||
321 | QRect arrowRect( | ||||
322 | contentsRect.right() - Metrics::MenuButton_IndicatorWidth + 1, contentsRect.top() + (contentsRect.height() - Metrics::MenuButton_IndicatorWidth) / 2, Metrics::MenuButton_IndicatorWidth, Metrics::MenuButton_IndicatorWidth); | ||||
323 | contentsRect.setRight(arrowRect.left() - Metrics::MenuItem_ItemSpacing - 1); | ||||
324 | | ||||
325 | if (menuItemOption->menuItemType == QStyleOptionMenuItem::SubMenu) { | ||||
326 | // apply right-to-left layout | ||||
327 | arrowRect = visualRect(option, arrowRect); | ||||
328 | | ||||
329 | // arrow orientation | ||||
330 | const ArrowOrientation orientation(reverseLayout ? ArrowLeft : ArrowRight); | ||||
331 | | ||||
332 | // color | ||||
333 | QColor arrowColor; | ||||
334 | if (useStrongFocus && (selected || sunken)) | ||||
335 | arrowColor = palette.color(QPalette::HighlightedText); | ||||
336 | else if (sunken) | ||||
337 | arrowColor = _helper->focusColor(palette); | ||||
338 | else if (selected) | ||||
339 | arrowColor = _helper->hoverColor(palette); | ||||
340 | else | ||||
341 | arrowColor = _helper->arrowColor(palette, QPalette::WindowText); | ||||
342 | | ||||
343 | // render | ||||
344 | _helper->renderArrow(painter, arrowRect, arrowColor, orientation); | ||||
345 | } | ||||
346 | | ||||
347 | // text | ||||
348 | auto textRect = contentsRect; | ||||
349 | if (!menuItemOption->text.isEmpty()) { | ||||
350 | // adjust textRect | ||||
351 | QString text = menuItemOption->text; | ||||
352 | textRect = centerRect(textRect, textRect.width(), option->fontMetrics.size(_mnemonics->textFlags(), text).height()); | ||||
353 | textRect = visualRect(option, textRect); | ||||
354 | | ||||
355 | // set font | ||||
356 | painter->setFont(menuItemOption->font); | ||||
357 | | ||||
358 | // color role | ||||
359 | const QPalette::ColorRole role = (useStrongFocus && (selected || sunken)) ? QPalette::HighlightedText : QPalette::WindowText; | ||||
360 | | ||||
361 | // locate accelerator and render | ||||
362 | const int tabPosition(text.indexOf(QLatin1Char('\t'))); | ||||
363 | if (tabPosition >= 0) { | ||||
364 | const int textFlags(Qt::AlignVCenter | Qt::AlignRight); | ||||
365 | QString accelerator(text.mid(tabPosition + 1)); | ||||
366 | text = text.left(tabPosition); | ||||
367 | drawItemText(painter, textRect, textFlags, palette, enabled, accelerator, role); | ||||
368 | } | ||||
369 | | ||||
370 | // render text | ||||
371 | const int textFlags(Qt::AlignVCenter | (reverseLayout ? Qt::AlignRight : Qt::AlignLeft) | _mnemonics->textFlags()); | ||||
372 | textRect = option->fontMetrics.boundingRect(textRect, textFlags, text); | ||||
373 | drawItemText(painter, textRect, textFlags, palette, enabled, text, role); | ||||
374 | | ||||
375 | // render hover and focus | ||||
376 | if (!useStrongFocus && (selected || sunken)) { | ||||
377 | QColor outlineColor; | ||||
378 | if (sunken) | ||||
379 | outlineColor = _helper->focusColor(palette); | ||||
380 | else if (selected) | ||||
381 | outlineColor = _helper->hoverColor(palette); | ||||
382 | | ||||
383 | _helper->renderFocusLine(painter, textRect, outlineColor); | ||||
384 | } | ||||
385 | } | ||||
386 | | ||||
387 | return true; | ||||
388 | } | ||||
389 | | ||||
390 | //______________________________________________________________________________ | ||||
391 | void Style::renderMenuTitle(const QStyleOptionToolButton *option, QPainter *painter, const QWidget *) const | ||||
392 | { | ||||
393 | // render a separator at the bottom | ||||
394 | const auto &palette(option->palette); | ||||
395 | const auto color(_helper->separatorColor(palette)); | ||||
396 | _helper->renderSeparator(painter, QRect(option->rect.bottomLeft() - QPoint(0, Metrics::MenuItem_MarginHeight), QSize(option->rect.width(), 1)), color); | ||||
397 | | ||||
398 | // render text in the center of the rect | ||||
399 | // icon is discarded on purpose | ||||
400 | painter->setFont(option->font); | ||||
401 | const auto contentsRect = insideMargin(option->rect, Metrics::MenuItem_MarginWidth, Metrics::MenuItem_MarginHeight); | ||||
402 | drawItemText(painter, contentsRect, Qt::AlignCenter, palette, true, option->text, QPalette::WindowText); | ||||
403 | } | ||||
404 | | ||||
405 | //____________________________________________________________________________________ | ||||
406 | QStyleOptionToolButton Style::separatorMenuItemOption(const QStyleOptionMenuItem *menuItemOption, const QWidget *widget) const | ||||
407 | { | ||||
408 | // separator can have a title and an icon | ||||
409 | // in that case they are rendered as sunken flat toolbuttons | ||||
410 | QStyleOptionToolButton toolButtonOption; | ||||
411 | toolButtonOption.initFrom(widget); | ||||
412 | toolButtonOption.rect = menuItemOption->rect; | ||||
413 | toolButtonOption.features = QStyleOptionToolButton::None; | ||||
414 | toolButtonOption.state = State_Enabled | State_AutoRaise; | ||||
415 | toolButtonOption.subControls = SC_ToolButton; | ||||
416 | toolButtonOption.icon = QIcon(); | ||||
417 | toolButtonOption.iconSize = QSize(); | ||||
418 | toolButtonOption.text = menuItemOption->text; | ||||
419 | | ||||
420 | toolButtonOption.toolButtonStyle = Qt::ToolButtonTextBesideIcon; | ||||
421 | return toolButtonOption; | ||||
422 | } | ||||
423 | | ||||
424 | //____________________________________________________________________ | ||||
425 | bool Style::showIconsInMenuItems() const | ||||
426 | { | ||||
427 | const KConfigGroup g(KSharedConfig::openConfig(), "KDE"); | ||||
428 | return g.readEntry("ShowIconsInMenuItems", true); | ||||
429 | } | ||||
430 | | ||||
431 | //____________________________________________________________________ | ||||
432 | bool Style::isMenuTitle(const QWidget *widget) const | ||||
433 | { | ||||
434 | // check widget | ||||
435 | if (!widget) | ||||
436 | return false; | ||||
437 | | ||||
438 | // check property | ||||
439 | const QVariant property(widget->property(PropertyNames::menuTitle)); | ||||
440 | if (property.isValid()) | ||||
441 | return property.toBool(); | ||||
442 | | ||||
443 | // detect menu toolbuttons | ||||
444 | QWidget *parent = widget->parentWidget(); | ||||
445 | if (qobject_cast<QMenu *>(parent)) { | ||||
446 | foreach (auto child, parent->findChildren<QWidgetAction *>()) { | ||||
447 | if (child->defaultWidget() != widget) | ||||
448 | continue; | ||||
449 | const_cast<QWidget *>(widget)->setProperty(PropertyNames::menuTitle, true); | ||||
450 | return true; | ||||
451 | } | ||||
452 | } | ||||
453 | | ||||
454 | const_cast<QWidget *>(widget)->setProperty(PropertyNames::menuTitle, false); | ||||
455 | return false; | ||||
456 | } | ||||
457 | | ||||
458 | } |