Design of note: following basically the message widget design, but reduced to only a colored border on the left side |_O_description_
| 167 | // |_O_description_ |
| 168 | // <vertical borderline><left margin><icon><spacing><description text><right margin> |
| 169 | static void doInlineNoteLayout(const KTextEditor::InlineNote& note, |
| 170 | InlineNoteLayout* layout) |
| 171 | { |
| 172 | const auto* view = note.view(); |
| 173 | const auto* style = view->style(); |
| 174 | const int leftMargin = style->pixelMetric(QStyle::PM_LayoutLeftMargin, nullptr, view); |
| 175 | layout->rightMargin = style->pixelMetric(QStyle::PM_LayoutRightMargin, nullptr, view); |
| 176 | const int noteSpacing = style->pixelMetric(QStyle::PM_LayoutHorizontalSpacing, nullptr, view); |
| 177 | |
| 178 | layout->iconSize = iconHeight(note); |
| 179 | |
| 180 | layout->iconX = noteBorderWidth + leftMargin; |
| 181 | layout->descriptionX = layout->iconX + layout->iconSize + noteSpacing; |
| 182 | } |
| 183 | |
| 184 | QSize ProblemInlineNoteProvider::inlineNoteSize(const KTextEditor::InlineNote& note) const |
| 185 | { |
no test coverage detected