Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI layout update #165

Merged
merged 15 commits into from
Mar 5, 2024
Merged

UI layout update #165

merged 15 commits into from
Mar 5, 2024

Conversation

toloudis
Copy link
Contributor

@toloudis toloudis commented Feb 23, 2024

another pre-release 1.6 polish update.

  • update Qt LTS version from 6.5.1 to 6.5.3 to pick up incidental bug fixes
  • set initial app size to about 80% of screen size when launching.
  • use Qt "Fusion" theme for consistent look across Windows/Mac/Linux (see https://doc.qt.io/qt-6/gallery.html)
  • add small workaround for macos bug fix with layouts that include a QPushButton
  • separate Area Light and Sky Light into their own sections
  • adjust number of decimals in a couple of key places where they didn't make sense

Estimated time to review: 15min or less

@toloudis toloudis marked this pull request as ready for review March 4, 2024 17:04
@toloudis toloudis requested a review from a team as a code owner March 4, 2024 17:05
@toloudis toloudis requested review from ShrimpCryptid and ascibisz and removed request for a team March 4, 2024 17:05
@@ -191,22 +193,25 @@ private slots:
QSlider m_slider;
};

class Controls
class AgaveFormLayout : public QGridLayout
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

introducing this class allowed finer control over laying out collections of input controls and lets us ensure some consistency across the ui.

@@ -287,14 +284,19 @@ QNumericSlider::QNumericSlider(QWidget* pParent /*= NULL*/)

m_slider.setOrientation(Qt::Horizontal);
m_slider.setFocusPolicy(Qt::StrongFocus);
m_spinner.setDecimals(4);
m_spinner.setDecimals(2);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these inputs will now get 2 decimals by default and they have to explicitly change that where it makes sense to.

Comment on lines +17 to +18
// deal with a macos style bug which causes this button to misalign in some situations
setAttribute(Qt::WA_LayoutUsesWidgetRect);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still a bug with the fusion style?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not a problem with fusion, but it still doesn't hurt to leave it in. If we ever switch back it would suddenly break something.

Copy link
Contributor

@ShrimpCryptid ShrimpCryptid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you for the occasional comments explaining your changes!

QObject::connect(
m_lt0gui.m_sizeSlider, &QNumericSlider::valueChanged, this, &QAppearanceSettingsWidget::OnSetAreaLightSize);

m_lt0gui.m_distSlider = new QNumericSlider();
m_lt0gui.m_distSlider->setStatusTip(tr("Set distance for area light"));
m_lt0gui.m_distSlider->setToolTip(tr("Set distance for area light"));
m_lt0gui.m_distSlider->setRange(0.1, 100.0);
m_lt0gui.m_distSlider->setRange(0.1, 10.0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, why did you change this value from 100 to 10?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This value is a distance from light source to volume. The volume size is normalized to 1.0 so putting the light 100 units away is not very useful. It keeps the slider range more manageable for practical numbers. The good news is that modifying the slider range does not hurt the ability to load and save values outside this range.

@toloudis toloudis merged commit a72038a into main Mar 5, 2024
7 checks passed
@toloudis toloudis deleted the feature/formlayouts branch March 5, 2024 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants