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

Change weird checkbox in fermentable table #81

Closed
theophae opened this Issue Sep 14, 2015 · 6 comments

Comments

Projects
None yet
3 participants
@theophae
Copy link
Contributor

theophae commented Sep 14, 2015

Since I use BT, I think the checkboxes that change when selected are very weird and unnatural.
For example, when the checkbox in unchecked, it indicate "steeped", but when I see it beside an unckecked checkbox, it seems to mean that the grain is not steeped.
I would be much clearer to have either a checkbox alone to indicate if the grain is mashed or a combo box with "Yes" or "No".
Same remark for the "Late Addition", it should use a combo box with "Normal" and "Late" as value.

If you think of other weird checkboxes like those, do not hesitate to add them.

I'd like to do this change, but I prefer to discuss what to do with you first.

@rocketman768

This comment has been minimized.

Copy link
Member

rocketman768 commented Sep 15, 2015

I think a combobox is the right replacement here. Thanks for pointing out these UI things that we've come to live with.

@theophae

This comment has been minimized.

Copy link
Contributor

theophae commented Sep 21, 2015

I working on this point for a couple of days, and I quite stuck with some problems:

  • I am searching a way to set the column width to the size of the longer choice in the comboBoxes. I think it is very annoying when you desire to change the type from grain to Dry Extract, for example, to have to resize the column manually.
  • As I replaced the QcheckBox with a QcomboBox , I'm looking for how to hide one of the QcomboBox parameters (Steeped or Not mashed regarding the case). More generally, I don't see how to access the combobox when I'm outside of the FermentableItemDelegate class (which as no access to fermentable data).

If any of you can help me with those points I'll be very grateful.

EDIT: I found a good way to keep all table content visible (see #6 discussion), and during my tests to find a way to hide a QcomboBox choice (which I failed), I discovered that when I use a QListView to display the QcomboBox choices, the QcomboBox size was adapted to its content size and not to the table cell size. I think it could be a good solution to keep the table as small as possible, but allowing the use to read all QcomboBox choices without manual operation.
If you know how to set the QcomboBox behavior like this without passing through a QListView it would be even better.

@rocketman768

This comment has been minimized.

Copy link
Member

rocketman768 commented Sep 22, 2015

Do you have any code we can look at? You can create a pull request if so.

@theophae

This comment has been minimized.

Copy link
Contributor

theophae commented Sep 22, 2015

I've created the pull request.

@mikfire

This comment has been minimized.

Copy link
Contributor

mikfire commented Sep 22, 2015

You need to poke at the sizeHints for the first question.

Assuming you are using the standard editor delegates, you can do this:
box->setMinimumWidth( box->minimumSizeHint().width() );
and the dropdown box will be properly sized. I've played a bit with the hop
table (one of the places where this annoys me to no end) and it does work.

If I understand the documentation correctly, you can't really access the
combobox "outside" of the delegate. The combobox is created when you start
editing the field, and then it is deleted when you are done. I don't think
there is a cached version of it to be accessed.

Mik

On Mon, Sep 21, 2015 at 7:16 AM, theophae notifications@github.com wrote:

I working on this point for a couple of days, and I quite stuck with some
problems:

  • I am searching a way to set the column width to the size of the
    longer choice in the comboBoxes. I think it is very annoying when you
    desire to change the type from grain to Dry Extract, for example, to have
    to resize the column manually.
  • As I replaced the checkbox with a combobox, I'm looking for how to
    hide one of the combobox parameters (Steeped or Not mashed regarding the
    case). More generally, I don't see how to access the combobox when I'm
    outside of the FermentableItemDelegate class (which as no access to
    fermentable data).

If any of you can help me with those points I'll be very grateful.


Reply to this email directly or view it on GitHub
#81 (comment)
.

In a world of ninja v. pirate, I pilot a Gundam

@theophae

This comment has been minimized.

Copy link
Contributor

theophae commented Sep 22, 2015

Thanks for the tips, it works very well and give the same result than my solution but in a simpler way.
About the second point, it is really to bad if we can't do it. What I've made works, but I feel it is weird to choose "Not Mashed" and to get "Steeped" afterwards. I really need to find a better way to do it.

@rocketman768 rocketman768 added this to the v2.3.0 milestone Oct 5, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment