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

Reusable Draft Snap toolbar commands #671

Closed
wants to merge 1 commit into from

Conversation

triplus
Copy link
Contributor

@triplus triplus commented Apr 3, 2017

  • Reusable Draft Snap toolbar commands
  • Use default size for toolbar/toolbuttons

Forum discussion:
https://forum.freecadweb.org/viewtopic.php?f=8&t=13509&p=168552#p168552

Thank you for creating a pull request to contribute to FreeCAD! To ease integration, please confirm the following:

  • Branch rebased on latest master git pull --rebase upstream master
  • Unit tests confirmed to pass by running ./bin/FreeCAD --run-test 0
  • Commit message is well-written
  • Commit message includes issue #<id> or fixes #<id> where <id> is the associated MantisBT issue id if one exists

And please remember to update the Wiki with the features added or changed once this PR once it is merged.


- Reusable Draft Snap toolbar commands
- Use default size for toolbar/toolbuttons
@wwmayer
Copy link
Contributor

wwmayer commented Apr 4, 2017

@yorikvanhavre your turn :)

@yorikvanhavre
Copy link
Member

The size things have been implemented by people using retina screen on mac. I have no way to judge if removing them still works for them, I'd prefer either to leave it like it was before, or find someone with a retina screen who can test this...

@bblacey
Copy link
Contributor

bblacey commented Apr 4, 2017

I have a Retina display so I can test this however it may not be for a couple of days.

@yorikvanhavre
Copy link
Member

No worries. Thanks @bblacey !

@triplus
Copy link
Contributor Author

triplus commented Apr 6, 2017

Thanks @bblacey.

@bblacey
Copy link
Contributor

bblacey commented Apr 7, 2017

Guys, sorry I haven't tested this yet but the Qt 4 formula maintainer renamed the formula today that borked a number of things with our builds. I have been working with the maintainer to fix the issues. Once the Qt 4 builds are back online, I will try to test this - again, apologies for the delay.

@triplus
Copy link
Contributor Author

triplus commented Apr 7, 2017

Take your time. When you get to it could you provide screenshot of both toolbars mentioned here:

https://forum.freecadweb.org/viewtopic.php?f=10&t=18932&start=20#p147796

As after Draft Snap toolbar work will be finished i will work on the second one. And i am interested in how it looks like ATM on high resolution display.

@bblacey
Copy link
Contributor

bblacey commented Apr 7, 2017

Sure - will do. I Resolved the Qt 4 issues with the Qt 4 maintainer late last night so builds are fixed. Need to switch my development environment back to Qt 5 in order to test. I will try to run the tests within the next couple days.

@bblacey
Copy link
Contributor

bblacey commented Apr 8, 2017

I just completed testing this PR on a Retina display and the scaling seems fine. Per request, here is a screenshot of the draft menu-bar that includes the two menus of interest. Let me know if you would like any additional tests/screenshots.

screen shot 2017-04-07 at 10 04 13 pm

Version details:

OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10675 (Git)
Build type: DEBUG
Branch: pr-671
Hash: 26a8729aa81c0c7a46e5772e564871b62b4a4278
Python version: 2.7.13
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.1.0

@wwmayer
Copy link
Contributor

wwmayer commented Apr 8, 2017

Thanks for testing! So, does it mean that without this PR the draft menu bar is broken in a certain way? Could you please add a screen shot of this broken menu too -- just to get an impression of how it looks like?

@triplus
Copy link
Contributor Author

triplus commented Apr 8, 2017

Thanks @bblacey for providing the screenshot. To me Draft Snap toolbar looks OK. I expected that as i have only reset the button/toolbar size to default values. The toolbar next to it (on the left) doesn't use standard size ATM and as i expected it doesn't look good. This will be fixed in future pull request related to that toolbar.

@wwmayer

The main point of this PR is user can reuse commands from Draft Snap toolbar in for example PieMenu. And not just the wrapper FreeCAD Draft Snap commands found in the Draft menu that don't have (visual) toggle capability and are only used to control the commands from Draft Snap toolbar.

Resetting the Draft Snap toolbar/button size to defaults is just an extra and unrelated feature.

@wwmayer
Copy link
Contributor

wwmayer commented Apr 9, 2017

OK, so then it can be merged or is there still something not clear?

@triplus
Copy link
Contributor Author

triplus commented Apr 9, 2017

As far as i am concerned proposed changes work for me. I can reuse Draft Snap toolbar commands in for example PieMenu. And at the same time i didn't introduce any changes that would make life harder for Yorik as the logic is still the same. It comes down to using QAction instead of QToolButton and everything else works in the same way as it did in the past.

P.S. As for the planned work on the second toolbar. That will be done as a part of separate pull request anyway.

@yorikvanhavre
Copy link
Member

Okay then I'm merging.

@triplus triplus deleted the DraftSnap branch April 9, 2017 23:53
mosfet80 added a commit to mosfet80/FreeCAD that referenced this pull request Dec 14, 2023
4.5.0 - 2023-10-07
Features
requirements-txt-fixer: also sort constraints.txt by default.
FreeCAD#857 PR by @lev-blit.
FreeCAD#830 issue by @PLPeeters.
debug-statements: add bpdb debugger.
FreeCAD#942 PR by @mwip.
FreeCAD#941 issue by @mwip.
Fixes
file-contents-sorter: fix sorting an empty file.
FreeCAD#944 PR by @RoelAdriaans.
FreeCAD#935 issue by @paduszyk.
double-quote-string-fixer: don't rewrite inside f-strings in 3.12+.
FreeCAD#973 PR by @asottile.
FreeCAD#971 issue by @XuehaiPan.
Migrating
now requires python >= 3.8.
FreeCAD#926 PR by @asottile.
FreeCAD#927 PR by @asottile.
4.4.0 - 2022-11-23
Features
forbid-submodules: new hook which outright bans submodules.
FreeCAD#815 PR by @asottile.
FreeCAD#707 issue by @ChiefGokhlayeh.
4.3.0 - 2022-06-07
Features
check-executables-have-shebangs: use git config core.fileMode to determine if it should query git.
FreeCAD#730 PR by @Kurt-von-Laven.
name-tests-test: add --pytest-test-first test convention.
FreeCAD#779 PR by @asottile.
Fixes
check-shebang-scripts-are-executable: update windows instructions.
FreeCAD#774 PR by @mdeweerd.
FreeCAD#770 issue by @mdeweerd.
check-toml: use stdlib tomllib when available.
FreeCAD#771 PR by @DanielNoord.
FreeCAD#755 issue by @sognetic.
check-added-large-files: don't run on non-file stages.
FreeCAD#778 PR by @asottile.
FreeCAD#777 issue by @skyj.
4.2.0 - 2022-04-06
Features
name-tests-test: updated display text.
FreeCAD#713 PR by @asottile.
check-docstring-first: make output more parsable.
FreeCAD#748 PR by @asottile.
check-merge-conflict: make output more parsable.
FreeCAD#748 PR by @asottile.
debug-statements: make output more parsable.
FreeCAD#748 PR by @asottile.
Fixes
check-merge-conflict: fix detection of ====== conflict marker on windows.
FreeCAD#748 PR by @asottile.
Updating
Drop python<3.7.
FreeCAD#719 PR by @asottile.
Changed default branch from master to main.
FreeCAD#744 PR by @asottile.
4.1.0 - 2021-12-22
Features
debug-statements: add pdbr debugger.
FreeCAD#614 PR by @cansarigol.
detect-private-key: add detection for additional key types.
FreeCAD#658 PR by @ljmf00.
check-executables-have-shebangs: improve messaging on windows.
FreeCAD#689 PR by @pujitm.
FreeCAD#686 issue by @jmerdich.
check-added-large-files: support --enforce-all with git-lfs.
FreeCAD#674 PR by @amartani.
FreeCAD#560 issue by @jeremy-coulon.
Fixes
check-case-conflict: improve performance.
FreeCAD#626 PR by @guykisel.
FreeCAD#625 issue by @guykisel.
forbid-new-submodules: fix false-negatives for pre-push.
FreeCAD#619 PR by @m-khvoinitsky.
FreeCAD#609 issue by @m-khvoinitsky.
check-merge-conflict: fix execution in git worktrees.
FreeCAD#662 PR by @errsyn.
FreeCAD#638 issue by @daschuer.
Misc.
Normalize case of hook names and descriptions.
FreeCAD#671 PR by @dennisroche.
FreeCAD#673 PR by @revolter.
4.0.1 - 2021-05-16
Fixes
check-shebang-scripts-are-executable fix entry point.
FreeCAD#602 issue by @Person-93.
FreeCAD#603 PR by @scop.
4.0.0 - 2021-05-14
Features
check-json: report duplicate keys.
FreeCAD#558 PR by @AdityaKhursale.
FreeCAD#554 issue by @adamchainz.
no-commit-to-branch: add main to default blocked branches.
FreeCAD#565 PR by @ndevenish.
check-case-conflict: check conflicts in directory names as well.
FreeCAD#575 PR by @slsyy.
FreeCAD#70 issue by @andyjack.
check-vcs-permalinks: forbid other branch names.
FreeCAD#582 PR by @jack1142.
FreeCAD#581 issue by @jack1142.
check-shebang-scripts-are-executable: new hook which ensures shebang'd scripts are executable.
FreeCAD#545 PR by @scop.
Fixes
check-executables-have-shebangs: Short circuit shebang lookup on windows.
FreeCAD#544 PR by @scop.
requirements-txt-fixer: Fix comments which have indentation
FreeCAD#549 PR by @greshilov.
FreeCAD#548 issue by @greshilov.
pretty-format-json: write to stdout using UTF-8 encoding.
FreeCAD#571 PR by @jack1142.
FreeCAD#570 issue by @jack1142.
Use more inclusive language.
FreeCAD#599 PR by @asottile.
Breaking changes
Remove deprecated hooks: flake8, pyflakes, autopep8-wrapper.
FreeCAD#597 PR by @asottile.
chennes pushed a commit that referenced this pull request Dec 18, 2023
4.5.0 - 2023-10-07
Features
requirements-txt-fixer: also sort constraints.txt by default.
#857 PR by @lev-blit.
#830 issue by @PLPeeters.
debug-statements: add bpdb debugger.
#942 PR by @mwip.
#941 issue by @mwip.
Fixes
file-contents-sorter: fix sorting an empty file.
#944 PR by @RoelAdriaans.
#935 issue by @paduszyk.
double-quote-string-fixer: don't rewrite inside f-strings in 3.12+.
#973 PR by @asottile.
#971 issue by @XuehaiPan.
Migrating
now requires python >= 3.8.
#926 PR by @asottile.
#927 PR by @asottile.
4.4.0 - 2022-11-23
Features
forbid-submodules: new hook which outright bans submodules.
#815 PR by @asottile.
#707 issue by @ChiefGokhlayeh.
4.3.0 - 2022-06-07
Features
check-executables-have-shebangs: use git config core.fileMode to determine if it should query git.
#730 PR by @Kurt-von-Laven.
name-tests-test: add --pytest-test-first test convention.
#779 PR by @asottile.
Fixes
check-shebang-scripts-are-executable: update windows instructions.
#774 PR by @mdeweerd.
#770 issue by @mdeweerd.
check-toml: use stdlib tomllib when available.
#771 PR by @DanielNoord.
#755 issue by @sognetic.
check-added-large-files: don't run on non-file stages.
#778 PR by @asottile.
#777 issue by @skyj.
4.2.0 - 2022-04-06
Features
name-tests-test: updated display text.
#713 PR by @asottile.
check-docstring-first: make output more parsable.
#748 PR by @asottile.
check-merge-conflict: make output more parsable.
#748 PR by @asottile.
debug-statements: make output more parsable.
#748 PR by @asottile.
Fixes
check-merge-conflict: fix detection of ====== conflict marker on windows.
#748 PR by @asottile.
Updating
Drop python<3.7.
#719 PR by @asottile.
Changed default branch from master to main.
#744 PR by @asottile.
4.1.0 - 2021-12-22
Features
debug-statements: add pdbr debugger.
#614 PR by @cansarigol.
detect-private-key: add detection for additional key types.
#658 PR by @ljmf00.
check-executables-have-shebangs: improve messaging on windows.
#689 PR by @pujitm.
#686 issue by @jmerdich.
check-added-large-files: support --enforce-all with git-lfs.
#674 PR by @amartani.
#560 issue by @jeremy-coulon.
Fixes
check-case-conflict: improve performance.
#626 PR by @guykisel.
#625 issue by @guykisel.
forbid-new-submodules: fix false-negatives for pre-push.
#619 PR by @m-khvoinitsky.
#609 issue by @m-khvoinitsky.
check-merge-conflict: fix execution in git worktrees.
#662 PR by @errsyn.
#638 issue by @daschuer.
Misc.
Normalize case of hook names and descriptions.
#671 PR by @dennisroche.
#673 PR by @revolter.
4.0.1 - 2021-05-16
Fixes
check-shebang-scripts-are-executable fix entry point.
#602 issue by @Person-93.
#603 PR by @scop.
4.0.0 - 2021-05-14
Features
check-json: report duplicate keys.
#558 PR by @AdityaKhursale.
#554 issue by @adamchainz.
no-commit-to-branch: add main to default blocked branches.
#565 PR by @ndevenish.
check-case-conflict: check conflicts in directory names as well.
#575 PR by @slsyy.
#70 issue by @andyjack.
check-vcs-permalinks: forbid other branch names.
#582 PR by @jack1142.
#581 issue by @jack1142.
check-shebang-scripts-are-executable: new hook which ensures shebang'd scripts are executable.
#545 PR by @scop.
Fixes
check-executables-have-shebangs: Short circuit shebang lookup on windows.
#544 PR by @scop.
requirements-txt-fixer: Fix comments which have indentation
#549 PR by @greshilov.
#548 issue by @greshilov.
pretty-format-json: write to stdout using UTF-8 encoding.
#571 PR by @jack1142.
#570 issue by @jack1142.
Use more inclusive language.
#599 PR by @asottile.
Breaking changes
Remove deprecated hooks: flake8, pyflakes, autopep8-wrapper.
#597 PR by @asottile.
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.

None yet

4 participants