Skip to content

Conversation

vikdevelop
Copy link
Contributor

Hello,
I found your app, which I think is useful.

I also think, it would be a very great, if the app remembered the height and the weight values, so I don't need to enter them each time the application is started, so I did it.

The changes include files:

  • data/io.github.philippkosarev.bmi.gschema.xml
  • src/window.py
  • src/main.py

@PhilippKosarev
Copy link
Owner

Hey, thank you for the pr :)
Everything looks pretty good.
The self.on_value_changed(_scroll="") line doesn't seem to do anything though, am I missing something?

@vikdevelop
Copy link
Contributor Author

The self.on_value_changed(_scroll="") line doesn't seem to do anything though, am I missing something?

No, this function shows the BMI result, such as underweight, healthy, overweight, etc., because if it's not there, it will display an incorrect BMI result when run.

@PhilippKosarev
Copy link
Owner

Yes, but commenting it out doesn't seem to affect the anything.
The adjustment = Gtk.Adjustment(lower= 10, upper=650, step_increment=1, page_increment=10, value=self.settings["weight"]) line sets the saved value, then before displaying the bmi self.calc_bmi() gets called (which takes the just set adjustment value), so it appears that the line is redundant.

@vikdevelop
Copy link
Contributor Author

vikdevelop commented Oct 13, 2024

Ok, I removed the self.on_value_changed(_scroll="") line.

@PhilippKosarev
Copy link
Owner

Alright then, everything else looks swell. Thanks for the contribution!

@PhilippKosarev PhilippKosarev merged commit ec30f31 into PhilippKosarev:main Oct 13, 2024
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