Skip to content

Commit

Permalink
We be sassy.
Browse files Browse the repository at this point in the history
  • Loading branch information
textbrowser committed Dec 18, 2024
1 parent a3cf185 commit f7e5d73
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Documentation/Release-Notes.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<li>Removed the Ctrl + A shortcuts from photographs as the shortcuts
will interfere with the wordly shortcut.</li>
<li>Replaced the dull selection border on a graphics item with a
sassy geometric shape. Notice the top-left corner.</li>
sassy geometric shape.</li>
<li>Second entry in the 2024.12.01 release notes: Kubuntu -> KDE.</li>
<li>Super fast selection of large table sets via Ctrl + A.</li>
<li>The newest version in postgresql_update_schema.sql should be
Expand Down
26 changes: 9 additions & 17 deletions Source/biblioteq_graphicsitempixmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,16 @@ static void qt_graphicsItem_highlightSelected
if(!item || !painter)
return;

auto rect(item->boundingRect());
const qreal radius = 30.0;

rect.setX(rect.x() + 1.0);
rect.setY(rect.y() + 1.0);

QPen pen;

pen.setColor(QColor(199, 21, 133));
pen.setWidthF(1.5);
painter->setPen(pen);
painter->drawEllipse(rect.topLeft().x(), rect.topLeft().y(), radius, radius);

QPainterPath path;

path.addEllipse
(rect.topLeft().x(), rect.topLeft().y(), radius - 1.0, radius - 1.0);
painter->fillPath(path, QColor(222, 141, 174));
auto rect(item->boundingRect());
const qreal offset = 5.0;

rect.setHeight(offset + rect.height());
rect.setWidth(offset + rect.width());
rect.setX(-offset + rect.x());
rect.setY(-offset + rect.y());
path.addRoundedRect(rect, 5.0, 5.0);
painter->fillPath(path, QColor(222, 141, 174, 100)); // Sassy Pink
}

class biblioteq_graphicsitempixmap: public QGraphicsPixmapItem
Expand Down

0 comments on commit f7e5d73

Please sign in to comment.