#include <algorithm>
+#include <QApplication>
#include <QFormLayout>
#include <QToolBar>
namespace view {
const int LogicSignal::SignalHeight = 30;
-const int LogicSignal::SignalMargin = 10;
const float LogicSignal::Oversampling = 2.0f;
std::pair<int, int> LogicSignal::v_extents() const
{
- return make_pair(-SignalHeight - SignalMargin, SignalMargin);
+ const int signal_margin =
+ QFontMetrics(QApplication::font()).height() / 2;
+ return make_pair(-SignalHeight - signal_margin, signal_margin);
}
int LogicSignal::scale_handle_offset() const