[consider merging] cross-hair cursor should not use selection default line width and styles (halo etc.)

This commit is contained in:
Matthias Koefferlein 2024-01-30 00:11:56 +01:00
parent 7a91a4fd42
commit aef8161c82
2 changed files with 15 additions and 14 deletions

View File

@ -105,15 +105,22 @@ MouseTracker::mouse_move_event (const db::DPoint &p, unsigned int /*buttons*/, b
double max_coord = 1e30; // big enough I guess
mp_markers.push_back (new lay::DMarker (mp_view));
mp_markers.back ()->set_line_style (m_cursor_line_style);
mp_markers.back ()->set_color (m_cursor_color);
mp_markers.back ()->set (db::DEdge (db::DPoint (tp.x (), -max_coord), db::DPoint (tp.x (), max_coord)));
for (int i = 0; i < 2; ++i) {
mp_markers.push_back (new lay::DMarker (mp_view));
mp_markers.back ()->set_line_style (m_cursor_line_style);
mp_markers.back ()->set_color (m_cursor_color);
mp_markers.back ()->set (db::DEdge (db::DPoint (-max_coord, tp.y ()), db::DPoint (max_coord, tp.y ())));
mp_markers.push_back (new lay::DMarker (mp_view));
mp_markers.back ()->set_line_style (m_cursor_line_style);
mp_markers.back ()->set_line_width (1);
mp_markers.back ()->set_halo (false);
mp_markers.back ()->set_dither_pattern (1);
mp_markers.back ()->set_color (m_cursor_color.is_valid () ? m_cursor_color : mp_view->canvas ()->foreground_color ());
if (i == 0) {
mp_markers.back ()->set (db::DEdge (db::DPoint (tp.x (), -max_coord), db::DPoint (tp.x (), max_coord)));
} else {
mp_markers.back ()->set (db::DEdge (db::DPoint (-max_coord, tp.y ()), db::DPoint (max_coord, tp.y ())));
}
}
}

View File

@ -55,9 +55,6 @@
</property>
<item row="1" column="1">
<widget class="lay::ColorButton" name="color_pb">
<property name="toolTip">
<string>The color in which the rulers are drawn</string>
</property>
<property name="text">
<string/>
</property>
@ -151,9 +148,6 @@
</item>
<item row="0" column="1">
<widget class="lay::ColorButton" name="color_chc">
<property name="toolTip">
<string>The color in which the rulers are drawn</string>
</property>
<property name="text">
<string/>
</property>