Skip to content

Comments

fix issues with units in the Quick Start wizard (Geometry tab)#3157

Merged
sunderme merged 3 commits intotexstudio-org:masterfrom
octaeder:quickWizard
Jun 12, 2023
Merged

fix issues with units in the Quick Start wizard (Geometry tab)#3157
sunderme merged 3 commits intotexstudio-org:masterfrom
octaeder:quickWizard

Conversation

@octaeder
Copy link
Contributor

@octaeder octaeder commented Jun 11, 2023

This PR enhances the page geometry configuration that is part of the Quick Start wizard.

Note: This PR is a cut down of #3156. A detailed discussion can be found there.

The PR addresses following observations:

  1. Lengths are given with a number combined with a unit. This unit is also mirrored as a suffix to the number in the spin box. When you alter a unit then the number is not adjusted (s. image below). This means that the length changes. But the picture visualizing the settings doesn't change (workaround: change temp. the number with up/down buttons). This is fixed.

  2. The mirrored units are removed by the PR (s. Test below).

    QuickDialogChangingUnitsIssue
    Fig,: Visualization doesn't reflect change of width when altering unit in combo box. Unit is editable (s. cursor mark).

  3. You can enter unknown units (like pico meters pm or nano meters nm) or even any text. In this case dialog falls back to mm. Unit dm is not in the list of the combo boxes, but is recognized when you enter it manually. But dm is not known to LaTeX. The PR therefore sets attribute editable to false for those combo boxes. As side effects signal editTextChanged() is replaced by currentTextChanged() and the names for the unit combo boxes are corrected from spinBoxUnitGeometryPageWidth to comboBoxUnitGeometryPageWidth, and so on.

  4. Code setting checkBoxes without effect is removed. Update: Since not totally correct this part is reverted.

Test

QuickDialogChangingUnits
Fig.: Visualization now reflects change of width when altering unit in combo box (not editable). Suffix units are not present.

These values are correctly saved in and loaded from the ini file. The LaTeX code looks fine:

Quick\Geometry%20Page%20Width=15
Quick\Geometry%20Page%20Width%20Unit=mm
\usepackage[width=15mm, height=23cm]{geometry}
Quick\Geometry%20Page%20Width=15
Quick\Geometry%20Page%20Width%20Unit=cm
\usepackage[width=15cm, height=23cm]{geometry}

@sunderme sunderme merged commit d7c82ac into texstudio-org:master Jun 12, 2023
@sunderme
Copy link
Member

thanks

@octaeder octaeder deleted the quickWizard branch June 12, 2023 18:07
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.

2 participants