Skip to content

Commit 3732752

Browse files
DelwingPiotr Wilczynski
andauthored
Make room borders less visible on far zoom outs (#4695)
* fix strange selection gradient behaviour when zooming out * make borders become more transparent while zooming out after certain zoom level * make room borders fade a bit earlier Co-authored-by: Piotr Wilczynski <piotr.wilczynski@bisnode.com>
1 parent 772f919 commit 3732752

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/T2DMap.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,8 +704,12 @@ inline void T2DMap::drawRoom(QPainter& painter, QFont& roomVNumFont, QFont& mapN
704704
roomPen.setWidth(borderWidth);
705705
painter.setBrush(roomColor);
706706

707-
if (shouldDrawBorder) {
707+
if (shouldDrawBorder && mRoomWidth >= 12) {
708708
roomPen.setColor(mpHost->mRoomBorderColor);
709+
} else if (shouldDrawBorder) {
710+
auto fadingColor = QColor(mpHost->mRoomBorderColor);
711+
fadingColor.setAlpha(255 * (mRoomWidth / 12));
712+
roomPen.setColor(fadingColor);
709713
}
710714

711715
if (isRoomSelected) {

0 commit comments

Comments
 (0)