Compare commits

...

3 Commits

Author SHA1 Message Date
Laurent Trinques 8c3343795a Merge pull request #362 from pkess/fix_typo
Fix typo widht to width
2025-02-19 15:54:59 +01:00
Peter Kessen 2097b24d37 Fix typo for variable 2025-02-18 20:14:51 +01:00
Peter Kessen 5351746dc7 Fix typo within settings entry 2025-02-18 20:13:10 +01:00
2 changed files with 4 additions and 4 deletions
@@ -46,7 +46,7 @@ DynamicElementTextItem::DynamicElementTextItem(Element *parent_element) :
QSettings settings;
setRotation(settings.value("dynamic_text_rotation", 0).toInt());
setKeepVisualRotation(true);
setTextWidth(settings.value("dynamic_text_widht", -1).toInt());
setTextWidth(settings.value("dynamic_text_width", -1).toInt());
connect(this, &DynamicElementTextItem::textEdited, [this](const QString &old_str, const QString &new_str)
{
if(this->m_parent_element && this->m_parent_element->diagram())
+3 -3
View File
@@ -403,10 +403,10 @@ QWidget *ElementPropertiesWidget::generalWidget()
//Set the maximum size of the pixmap to the minimum size of the layout
QPixmap pixmap = m_element->pixmap();
int margin = vlayout_->contentsMargins().left() + vlayout_->contentsMargins().right();
int widht_ = vlayout_->minimumSize().width()-margin;
int width_ = vlayout_->minimumSize().width()-margin;
if (pixmap.size().width() > widht_ || pixmap.size().height() > widht_) {
pix->setPixmap(m_element->pixmap().scaled (widht_, widht_, Qt::KeepAspectRatio, Qt::SmoothTransformation));
if (pixmap.size().width() > width_ || pixmap.size().height() > width_) {
pix->setPixmap(m_element->pixmap().scaled (width_, width_, Qt::KeepAspectRatio, Qt::SmoothTransformation));
}
else {
pix->setPixmap(pixmap);