on xenial help sign in
Allow libertine-scope to show empty search result hint unmodified.

Fixes bug #1606693. (LP: #1606693) Approved by: Albert Astals Cid

commita55386d427c7c0899fc27a187b8d412d045258d0 authorLarry Price <larry.price@canonical.com> dateThu 11 Aug 2016, 06:23 (10 years ago) parent7a22ba2df8a7dd
1 file changed+7−2
qml/Dash/GenericScopeView.qml+7−2
qml/Dash/GenericScopeView.qml+7−2
@@ -343,7 +343,7 @@ FocusScope {
343343 updateRanges();
344344 clickScopeSizingHacks();
345345 if (scope && (scope.id === "clickscope" || scope.id === "libertine-scope.ubuntu_libertine-scope")) {
346− if (scope.id === "libertine-scope.ubuntu_libertine-scope" || categoryId === "predefined" || categoryId === "local") {
346+ if (isLibertineContainerCategory() || categoryId === "predefined" || categoryId === "local") {
347347 cardTool.artShapeSize = Qt.binding(function() { return Qt.size(units.gu(8), units.gu(7.5)) });
348348 cardTool.artShapeStyle = "icon";
349349 } else {
@@ -366,10 +366,15 @@ FocusScope {
366366 property int pxpgu: units.gu(1);
367367 onPxpguChanged: clickScopeSizingHacks();
368368
369+ // Returns true if the current category pertains to a Libertine container
370+ function isLibertineContainerCategory() {
371+ return scope && scope.id === "libertine-scope.ubuntu_libertine-scope" && categoryId !== "hint";
372+ }
373+
369374 function clickScopeSizingHacks() {
370375 if (scope &&
371376 ((scope.id === "clickscope" && (categoryId === "predefined" || categoryId === "local")) ||
372− scope.id === "libertine-scope.ubuntu_libertine-scope")) {
377+ isLibertineContainerCategory())) {
373378 // Yeah, hackish :/
374379 if (scopeView.width > units.gu(45)) {
375380 if (scopeView.width >= units.gu(70)) {