If LoD is really blocked by some limitation we sneakily reset the checkbox to let the user know it is fully disabled.
119{
120 QString toolTip;
121
123 QString blockersText;
125 blockersText.append("<li>");
126 blockersText.append(
id.
name());
127 blockersText.append("</li>");
128 }
129
130 toolTip = i18nc("@info:tooltip",
131 "<p>Instant Preview Mode is "
132 "disabled by the following options:"
133 "<ul>%1</ul></p>", blockersText);
135
136 const qreal effectiveBrushSize =
m_d->model->effectiveBrushSize.get();
137 const qreal sizeThreshold =
m_d->model->lodSizeThreshold();
138
139 toolTip = i18nc("@info:tooltip",
140 "<p>Instant Preview Mode is "
141 "disabled by instant preview threshold. "
142 "Please right-click here to change the threshold"
143 "<ul><li>Brush size %1</li>"
144 "<li>Threshold: %2</li></ul></p>",
145 effectiveBrushSize, sizeThreshold);
146
148
149 QString limitationsText;
151 limitationsText.append("<li>");
152 limitationsText.append(
id.
name());
153 limitationsText.append("</li>");
154 }
155
156 toolTip = i18nc("@info:tooltip",
157 "<p>Instant Preview may look different "
158 "from the final result. In case of troubles "
159 "try disabling the following options:"
160 "<ul>%1</ul></p>", limitationsText);
161 } else {
162 toolTip = i18nc("@info:tooltip", "<p>Instant Preview Mode is available</p>");
163 }
164
166 i18n("(Instant Preview)*") : i18n("Instant Preview");
167
168
169 {
170 QFont font;
174 m_d->btnLod->setFont(font);
175 m_d->btnLod->setText(text);
176 m_d->btnLod->setToolTip(toolTip);
177
185 m_d->chkLod->setChecked(
false);
186 } else {
188 m_d->chkLod->setChecked(isLodUserAllowed);
189 }
190 }
191}
const char * name(StandardAction id)