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