[TD]Section dialog gui tweaks
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>370</width>
|
||||
<width>373</width>
|
||||
<height>612</height>
|
||||
</rect>
|
||||
</property>
|
||||
@@ -85,13 +85,6 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
@@ -244,15 +237,14 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="gbOrientation">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Set View Direction</string>
|
||||
</property>
|
||||
@@ -261,9 +253,15 @@
|
||||
<layout class="QHBoxLayout" name="viewDirectionLayout"/>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="quickPickLayout">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<widget class="QPushButton" name="pbUp">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Preset view direction looking up.</string>
|
||||
</property>
|
||||
@@ -281,10 +279,19 @@
|
||||
<height>48</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="pbDown">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Preset view direction looking down.</string>
|
||||
</property>
|
||||
@@ -304,8 +311,14 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="pbLeft">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Preset view direction looking left.</string>
|
||||
</property>
|
||||
@@ -325,8 +338,14 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QPushButton" name="pbRight">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Preset view direction looking right.</string>
|
||||
</property>
|
||||
@@ -354,13 +373,6 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="title">
|
||||
|
||||
@@ -159,15 +159,14 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="gbOrientation">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Set View Direction</string>
|
||||
</property>
|
||||
@@ -311,13 +310,6 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="gbPlane">
|
||||
<property name="toolTip">
|
||||
@@ -470,13 +462,6 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="gbUpdate">
|
||||
<property name="title">
|
||||
@@ -530,7 +515,7 @@
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../../../../../../Documents/FreeCAD/Stash/Gui_SectionDlg/Resources/TechDraw.qrc"/>
|
||||
<include location="Resources/TechDraw.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
||||
@@ -93,9 +93,24 @@ void CompassDialWidget::drawWidget(QPainter& painter)
|
||||
void CompassDialWidget::drawBackground(QPainter& painter)
|
||||
{
|
||||
painter.save();
|
||||
|
||||
//Move to the center of the compass
|
||||
painter.translate(width() / 2, height() / 2);
|
||||
double scale = std::min((float) width() / (float) (m_designDiameter + 2.0 * m_margin),
|
||||
(float) height() / (float) (m_designDiameter + 2.0 * m_margin));
|
||||
painter.scale(scale, scale);
|
||||
|
||||
painter.setPen(QPen(Qt::NoPen));
|
||||
// Clear the background
|
||||
painter.fillRect(m_rect, palette().brush((QPalette::Window)));
|
||||
int circleWidth = 2.0 * (m_designRadius + m_margin);
|
||||
int circleHeight = 2.0 * (m_designRadius + m_margin);
|
||||
QRect circleRect(-circleWidth / 2, -circleHeight / 2, circleWidth, circleHeight);
|
||||
painter.drawEllipse(circleRect);
|
||||
// QRect backRect(-m_rect.width() / 2, -m_rect.height() / 2, m_rect.width(), m_rect.height());
|
||||
QPainterPath backPath;
|
||||
backPath.addEllipse(circleRect);
|
||||
painter.fillPath(backPath, palette().brush((QPalette::Window)));
|
||||
// painter.fillRect(backRect, palette().brush((QPalette::Window)));
|
||||
painter.restore();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user