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

Make values in attribute form better readable #8064

Merged
merged 1 commit into from Sep 29, 2018
Merged

Make values in attribute form better readable #8064

merged 1 commit into from Sep 29, 2018

Conversation

rduivenvoorde
Copy link
Contributor

Description

Currently in readonly modus of a form, the line-edits get
a 'disabled'-palette (to distinguish from writable mode). But because text is then so light, readability
is bad in my opinion:

image

Removing this 'diabled'-palette make the lineedits look like they are writable
input fields. See below: top is without the 'Disable-palette' in readonly modus,
Bottom is in writable modus.

defaultpalette

So to distinguish them from input field more, I opt to remove the frame
and set the background (of the lineEdit) set to almost
transparent. Below is the result of current PR:

white75percent

I think 75% transparent is better then make the background fully transparent:

white0percent

Started as a question on the dev list: https://lists.osgeo.org/pipermail/qgis-developer/2018-September/054676.html

I only am able to build on Linux/Gnome, so please check if this works on Windows/Mac too.

Or discuss here ...

Checklist

Reviewing is a process done by project maintainers, mostly on a volunteer basis. We try to keep the overhead as small as possible and appreciate if you help us to do so by completing the following items. Feel free to ask in a comment if you have troubles with any of them.

  • [ X ] Commit messages are descriptive and explain the rationale for changes
  • [ - ] Commits which fix bugs include fixes #11111 in the commit message next to the description
  • [ - ] Commits which add new features are tagged with [FEATURE] in the commit message
  • [ - ] Commits which change the UI or existing user workflows are tagged with [needs-docs] in the commit message and contain sufficient information in the commit message to be documented
  • [ X ] I have read the QGIS Coding Standards and this PR complies with them
  • This PR passes all existing unit tests (test results will be reported by travis-ci after opening this PR)
  • New unit tests have been added for core changes
  • [ X ] I have run the scripts/prepare-commit.sh script before each commit

Currently in readonly modus of a form, the line-edits get
a 'disabled'-palette. But because text is then so light readability
is bad.
Removing the palette make the lineedits look like they are writable
input fields. So to distinguish them from input field, the frame
is removed and the background (of the lineEdit) is set to almost
transparent.
@nyalldawson
Copy link
Collaborator

I like this a lot

@nirvn
Copy link
Contributor

nirvn commented Sep 29, 2018

Big +1

@NathanW2
Copy link
Member

NathanW2 commented Sep 29, 2018 via email

@nyalldawson
Copy link
Collaborator

Ok, let's merge and see what happens. Still plenty of time before release to tweak /revert

@nyalldawson nyalldawson merged commit fc7df32 into qgis:master Sep 29, 2018
@elpaso
Copy link
Contributor

elpaso commented Oct 1, 2018

Looks good, but there is still an issue with combos:

immagine

@nyalldawson
Copy link
Collaborator

Spin boxes too need attention

@rduivenvoorde
Copy link
Contributor Author

Mmm, I think the big question, is (as all those values are readonly), if we want to 'style' the spinbox/combo more in line with the style of the line-edit now (doable I think),
OR if we want to change the widget type from spinbox/combo to line-edit when toggling between edit/read?
Last way (I think) is harder?

@elpaso
Copy link
Contributor

elpaso commented Oct 1, 2018

Yep, last way is harder. I'd try the style option first.

@rduivenvoorde
Copy link
Contributor Author

@nyalldawson @elpaso ok, I tried to fix the other 'wrappedWidgets' too, but there is too many magic going on there, at least to me . I'm afraid to fix this cosmetic issue would add just too much extra code and make the already complex styling thingies going on there (eg with the relations, indeterminate state etc etc) even more complex (mixing/fiddling with Patterns AND stylesheets).

So I would be ok to just roll back (aka I would prefer to roll back this): adding this fix to the other widgets would add more complexity then fix an issue.

@andreasneumann
Copy link
Member

There is a problem on Windows:
In drag and drop form mode (probably the most popular mode), if labels/widgets are in a tab, then both the background of the tab and the background of the form widgets are white. In such a case there is no distinction between a widget and a label. I think it is important that the users can easily see the difference between a widget and a label.

image

Can we change the background color of the tabs to show the widgets again?

Also, there are still a lot of inconsistencies for different widget types. Comboboxes (relation reference widgets) still show a frame, while text input boxes, don't. NULL values in text widgets still appear as gray.

Thanks for having a look at it again!

@mbernasocchi
Copy link
Member

mbernasocchi commented Oct 9, 2018

Swimming a bit against the current here, but I preferred the old way. Sorry for not commenting earlier, I just noticed this due to Andreas and Nyall mail

@rduivenvoorde
Copy link
Contributor Author

@mbernasocchi as seen in the comment earlier, I'm not able to make this work for all sorts of (wrapped)widgets and styles. I'll do a rollback PR tomorrow.

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

7 participants