Skip to content

Commit

Permalink
Merge pull request #850 from matty0ung/usability
Browse files Browse the repository at this point in the history
Layout fixes for editors
  • Loading branch information
matty0ung authored Oct 8, 2024
2 parents 339d2f2 + c4dc304 commit d86a543
Show file tree
Hide file tree
Showing 42 changed files with 2,688 additions and 1,204 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,11 @@ jobs:
# that service to use it, so this step can't be done in forked repositories.
#
# Various settings here have to align with the "brewtarget" project in the "Brewtarget [OSS]" organisation
# registered at https://app.signpath.io/.
# registered at https://app.signpath.io/. In some places you have to be quite pedantic about the settings (both
# here and in the SignPath account). Eg at one point we were getting the following error:
#
# "The supplied repository URL 'https://github.com/Brewtarget/brewtarget' does not match
# the expected repository URLs 'https://github.com/Brewtarget/brewtarget/'."
#
# See https://github.com/SignPath/github-action-submit-signing-request for documentation of this action (including
# parameters such as github-artifact-id). Also see https://github.com/SignPath/github-actions-extended-demo/ for
Expand Down
14 changes: 13 additions & 1 deletion CHANGES.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@ happens, so I'm now setting it to a slightly arbitrary time early in the morning
* Additional methods for calculating IBU
* We'll list other new features here...

## v4.0.7
Bug fixes and minor enhancements.

### New Features
* None

### Bug Fixes
* Some input fields not wide enough on various editors [849](https://github.com/Brewtarget/brewtarget/issues/849)

### Release Timestamp
Mon, 7 Oct 2024 04:00:06 +0100

## v4.0.6
Bug fixes for the 4.0.5 release (ie bugs in 4.0.5 are fixed in this 4.0.6 release).

Expand All @@ -28,7 +40,7 @@ Bug fixes for the 4.0.5 release (ie bugs in 4.0.5 are fixed in this 4.0.6 releas
* Adding Mash Step causes core dump [847](https://github.com/Brewtarget/brewtarget/issues/847)

### Release Timestamp
Wed, 2 Oct 2024 04:00:06 +0100
Sun, 6 Oct 2024 04:00:06 +0100

## v4.0.5
Bug fixes for the 4.0.4 release (ie bugs in 4.0.4 are fixed in this 4.0.5 release).
Expand Down
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
# CMakeLists.txt is part of Brewtarget, and is Copyright the following
# authors 2009-2024
# CMakeLists.txt is part of Brewtarget, and is Copyright the following authors 2009-2024
# - Chris Pavetto <[email protected]>
# - Dan Cavanagh <[email protected]>
# - Daniel Moreno <[email protected]>
Expand Down Expand Up @@ -111,7 +110,7 @@ endif()
#=======================================================================================================================
# It's simplest to keep the project name all lower-case as it means we can use a lot more of the default settings for
# Linux packaging (where directory names etc are expected to be all lower-case).
project(brewtarget VERSION 4.0.6 LANGUAGES CXX)
project(brewtarget VERSION 4.0.7 LANGUAGES CXX)
message(STATUS "Building ${PROJECT_NAME} version ${PROJECT_VERSION}")
message(STATUS "PROJECT_SOURCE_DIR is ${PROJECT_SOURCE_DIR}")
# Sometimes we do need the capitalised version of the project name
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
#
#
project('brewtarget', 'cpp',
version: '4.0.6',
version: '4.0.7',
license: 'GPL-3.0-or-later',
meson_version: '>=0.60.0',
default_options : ['cpp_std=c++20',
Expand Down
2 changes: 1 addition & 1 deletion src/editors/MashEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ MashEditor::MashEditor(QWidget* parent) :
m_mashObs{nullptr} {
setupUi(this);

SMART_FIELD_INIT(MashEditor, label_name , lineEdit_name , Mash, PropertyNames::NamedEntity::name );
/// SMART_FIELD_INIT(MashEditor, label_name , lineEdit_name , Mash, PropertyNames::NamedEntity::name );
SMART_FIELD_INIT(MashEditor, label_grainTemp , lineEdit_grainTemp , Mash, PropertyNames::Mash::grainTemp_c , 1);
SMART_FIELD_INIT(MashEditor, label_spargeTemp, lineEdit_spargeTemp, Mash, PropertyNames::Mash::spargeTemp_c , 1);
SMART_FIELD_INIT(MashEditor, label_spargePh , lineEdit_spargePh , Mash, PropertyNames::Mash::ph , 0);
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/CustomComboBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ CustomComboBox::CustomComboBox(QWidget* parent) : QComboBox(parent) {
CustomComboBox::~CustomComboBox() = default;

void CustomComboBox::showPopup() {
view()->setFixedWidth(300);
// view()->setFixedWidth(300);
QComboBox::showPopup();
return;
}
Expand Down
6 changes: 6 additions & 0 deletions src/widgets/InfoButton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,15 @@ namespace {
}

InfoButton::InfoButton(QWidget * parent) : QPushButton(parent), m_infoText{nullptr} {
//
// Shrink the button down from its default size, otherwise the 'ⓘ' will be surrounded by too much space. Leave a
// bit of space around the 'ⓘ' however, otherwise it looks cramped. (Yes, we are adding 10% twice -- once to make
// the circle 10% bigger than it otherwise would be, and once to add 10% space around the outside of the circle.)
//
// This is one of the few places where we really do want to use setFixedSize (rather than setMinimumSize or
// setMinimumWidth). It doesn't make sense to let Qt's layout manager grow the button just because the window it is
// in is expanded.
//
double const diameter = static_cast<double>(this->getCircleDiameter());
int const width = static_cast<int>(diameter * 1.1);
int const height = width;
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/SmartLineEdit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class SmartLineEdit::impl {
}
this->calculateDisplaySize(sizingString);
}
this->m_self.setFixedWidth(this->m_desiredWidthInPixels);
this->m_self.setMinimumWidth(this->m_desiredWidthInPixels);
return;
}

Expand Down
135 changes: 115 additions & 20 deletions translations/bt_ca.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2313,10 +2313,6 @@ Log file may contain more details.</source>
<source>Remove %1 from recipe</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Add %1 step to recipe</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Remove %1</source>
<translation type="unfinished"></translation>
Expand Down Expand Up @@ -5213,6 +5209,13 @@ El volum final al primari és de %1.</translation>
<translation type="unfinished">Pas</translation>
</message>
</context>
<context>
<name>StepClass</name>
<message>
<source>Add %1 step to recipe</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>StepExtended</name>
<message>
Expand Down Expand Up @@ -6241,17 +6244,29 @@ El volum final al primari és de %1.</translation>
<translation type="unfinished">Notes</translation>
</message>
<message>
<source>New hop</source>
<source>Save and close</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Save and close</source>
<source>Discard and close</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Discard and close</source>
<source>New boil</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>New</source>
<translation type="unfinished">Nou</translation>
</message>
<message>
<source>Save</source>
<translation type="unfinished">Desa</translation>
</message>
<message>
<source>Cancel</source>
<translation type="unfinished">Cancel·lar</translation>
</message>
</context>
<context>
<name>boilStepEditor</name>
Expand Down Expand Up @@ -6926,6 +6941,18 @@ El volum final al primari és de %1.</translation>
<source>Packaging Vessel Type</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>New</source>
<translation type="unfinished">Nou</translation>
</message>
<message>
<source>Save</source>
<translation type="unfinished">Desa</translation>
</message>
<message>
<source>Cancel</source>
<translation type="unfinished">Cancel·lar</translation>
</message>
</context>
<context>
<name>fermentableEditor</name>
Expand Down Expand Up @@ -7237,6 +7264,18 @@ El volum final al primari és de %1.</translation>
<source>Grain Group</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>New</source>
<translation type="unfinished">Nou</translation>
</message>
<message>
<source>Save</source>
<translation type="unfinished">Desa</translation>
</message>
<message>
<source>Cancel</source>
<translation type="unfinished">Cancel·lar</translation>
</message>
</context>
<context>
<name>fermentationEditor</name>
Expand All @@ -7261,17 +7300,29 @@ El volum final al primari és de %1.</translation>
<translation type="unfinished">Notes</translation>
</message>
<message>
<source>New hop</source>
<source>Save and close</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Save and close</source>
<source>Discard and close</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Discard and close</source>
<source>New fermentation</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>New</source>
<translation type="unfinished">Nou</translation>
</message>
<message>
<source>Save</source>
<translation type="unfinished">Desa</translation>
</message>
<message>
<source>Cancel</source>
<translation type="unfinished">Cancel·lar</translation>
</message>
</context>
<context>
<name>fermentationStepEditor</name>
Expand Down Expand Up @@ -7698,6 +7749,18 @@ El volum final al primari és de %1.</translation>
<source>You can normally ignore this, but it&apos;s sometimes useful for debugging.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>New</source>
<translation type="unfinished">Nou</translation>
</message>
<message>
<source>Save</source>
<translation type="unfinished">Desa</translation>
</message>
<message>
<source>Cancel</source>
<translation type="unfinished">Cancel·lar</translation>
</message>
</context>
<context>
<name>instructionWidget</name>
Expand Down Expand Up @@ -8835,10 +8898,6 @@ El volum final al primari és de %1.</translation>
<source>Notes</source>
<translation type="unfinished">Notes</translation>
</message>
<message>
<source>New misc</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Save and close</source>
<translation type="unfinished"></translation>
Expand Down Expand Up @@ -8871,6 +8930,18 @@ El volum final al primari és de %1.</translation>
<source>You can normally ignore this, but it&apos;s sometimes useful for debugging.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>New</source>
<translation type="unfinished">Nou</translation>
</message>
<message>
<source>Save</source>
<translation type="unfinished">Desa</translation>
</message>
<message>
<source>Cancel</source>
<translation type="unfinished">Cancel·lar</translation>
</message>
</context>
<context>
<name>namedMashEditor</name>
Expand Down Expand Up @@ -9922,15 +9993,15 @@ El volum final al primari és de %1.</translation>
</message>
<message>
<source>New</source>
<translation type="vanished">Nou</translation>
<translation>Nou</translation>
</message>
<message>
<source>Save</source>
<translation type="vanished">Desa</translation>
<translation>Desa</translation>
</message>
<message>
<source>Cancel</source>
<translation type="vanished">Cancel·lar</translation>
<translation>Cancel·lar</translation>
</message>
<message>
<source>Main</source>
Expand Down Expand Up @@ -10157,17 +10228,29 @@ El volum final al primari és de %1.</translation>
<translation type="unfinished"></translation>
</message>
<message>
<source>New hop</source>
<source>Save and close</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Save and close</source>
<source>Discard and close</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Discard and close</source>
<source>New water</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>New</source>
<translation type="unfinished">Nou</translation>
</message>
<message>
<source>Save</source>
<translation type="unfinished">Desa</translation>
</message>
<message>
<source>Cancel</source>
<translation type="unfinished">Cancel·lar</translation>
</message>
</context>
<context>
<name>yeastEditor</name>
Expand Down Expand Up @@ -10471,5 +10554,17 @@ El volum final al primari és de %1.</translation>
<source>You can normally ignore this, but it&apos;s sometimes useful for debugging.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>New</source>
<translation type="unfinished">Nou</translation>
</message>
<message>
<source>Save</source>
<translation type="unfinished">Desa</translation>
</message>
<message>
<source>Cancel</source>
<translation type="unfinished">Cancel·lar</translation>
</message>
</context>
</TS>
Loading

0 comments on commit d86a543

Please sign in to comment.