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

New color buttons #194

Merged
merged 3 commits into from Oct 14, 2020
Merged

Conversation

cvuchener
Copy link
Contributor

They can be reset in the context menu, but it is not obvious this menu exists. I tried with QToolButtons instead of QPushButtons to make the menu existence more visible but they have issues of their own (mostly weird behavior with setEnabled).

@cvuchener
Copy link
Contributor Author

cvuchener commented Mar 5, 2020

Current proposition for happiness colors:

Sélection_031

Sélection_032

@feelotraveller
Copy link

feelotraveller commented Mar 5, 2020

Several comments, I'll number them for less confusion:

  1. The colours look fine (the previous set - 00ff00 80ff40 d4ff80 ffffbf ffd480 ff8040 ff0000 was also good).

  2. After building this branch I had to 'restore defaults' to get the new colours to show - it had the side-consequence of clearing 'all' my Options settings which is not ideal.

  3. Well nigh time the copyright was updated. 👍

  4. I'm still getting errors of the form qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 24185, resource id: 10555674, major code: 40 (TranslateCoords), minor code: 0 but only when clicking the cancel button from the Options menu. When using the Windows -> Docks -> Grid Views menu after an attempt or two this also reliably happens when clicking either the OK or the cancel buttons. Should this be ignored?

  5. The alignment for the labels of the colour buttons under Options is slightly out. For happiness this is only noticeable for 'Fine' (slightly, about a character, too far right aligned) but is more prevalent in the Options -> Grid Colours tab. [Edit: I think it would be best to align the colour boxes rather than just center?]

  6. Happy to see the colour popup gone - one less window to click through.

@cvuchener
Copy link
Contributor Author

After building this branch I had to 'restore defaults' to get the new colours to show - it had the side-consequence of clearing 'all' my Options settings which is not ideal.

"Restore defaults" restores all settings, but you can still click cancel and it won't be saved. The bug was that only the skill drawing style was reset.

Well nigh time the copyright was updated. 👍

Not updated, just a new file.

I'm still getting errors of the form qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 24185, resource id: 10555674, major code: 40 (TranslateCoords), minor code: 0 but only when clicking the cancel button from the Options menu. When using the Windows -> Docks -> Grid Views menu after an attempt or two this also reliably happens when clicking either the OK or the cancel buttons. Should this be ignored?

QTBUG-56893?

The alignment for the labels of the colour buttons under Options is slightly out. For happiness this is only noticeable for 'Fine' (slightly, about a character, too far right aligned) but is more prevalent in the Options -> Grid Colours tab.

I don't understand. Is your issue with the buttons not being the same width? I could change that but then the button text+icon is centered, it requires stylesheet tweaks to have the text+icon left aligned.

@feelotraveller
Copy link

After building this branch I had to 'restore defaults' to get the new colours to show - it had the side-consequence of clearing 'all' my Options settings which is not ideal.

"Restore defaults" restores all settings, but you can still click cancel and it won't be saved.

Is there another way to get the new default colours to show? Otherwise anyone who is updating DT will either lose their customised settings (perhaps unexpectedly) or not get the new default colours.

QTBUG-56893?

Thanks, that's the one. Poor search-fu kept returning older ('fixed') upstream results for me.

The alignment for the labels of the colour buttons under Options is slightly out. For happiness this is only noticeable for 'Fine' (slightly, about a character, too far right aligned) but is more prevalent in the Options -> Grid Colours tab.

I don't understand. Is your issue with the buttons not being the same width? I could change that but then the button text+icon is centered, it requires stylesheet tweaks to have the text+icon left aligned.

For me the issue is that it looks really messy that the coloured boxes don't line up. This shows 'it':

align

@cvuchener
Copy link
Contributor Author

Button size policy depends on style! That explains why I was confused with the size policy earlier. Revert
dc60940 and the buttons will have the text left aligned.

Is there another way to get the new default colours to show?

Right-click on the button. It is not obvious and I know it (I said it the first comment). I may have an idea to make the QToolButton work, I'll try that tomorrow.

@feelotraveller
Copy link

Revert
dc60940 and the buttons will have the text left aligned.

Got it. That works. :)

Is there another way to get the new default colours to show?

Right-click on the button. It is not obvious and I know it (I said it the first comment). I may have an idea to make the QToolButton work, I'll try that tomorrow.

Ah, that's me skipping over the bit I didn't understand. (And now I remember: context menu = right click. Grin.)

@cvuchener
Copy link
Contributor Author

Trying without the icons so I don't have to align them.

Sélection_033

There is still issues with transparent colors ("Inactive Group Cell" and "Partial Group Cell" use semi-transparent black, custom profession use transparent black).

@cvuchener
Copy link
Contributor Author

The color does not show on macOS style. :(

@cvuchener
Copy link
Contributor Author

  • rebased on latest master
  • back to icons
  • still using tool button with submenu for reset
  • checkers for transparent colors

@cvuchener cvuchener merged commit e226ad4 into Dwarf-Therapist:master Oct 14, 2020
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

2 participants