Step property to use slider with fixed intervals #608

Merged
merged 37 commits into from Sep 2, 2012

Conversation

Projects
None yet
7 participants
@legikaloz
Contributor

legikaloz commented Aug 2, 2012

No description provided.

@tito

This comment has been minimized.

Show comment Hide comment
@tito

tito Aug 2, 2012

Owner

Good one, but incomplete :) If you specified a min/max in float, the value can be in float too.
Then, it would be better to have a step property with 0 by default (BoundedNumericProperty(0, min=0)), and take use the step method if it's > 0 only. :)

Also, check how to mark the property with a ".. versionadded:: 1.4.0". (grep in the current source code)

Thanks you!

Owner

tito commented Aug 2, 2012

Good one, but incomplete :) If you specified a min/max in float, the value can be in float too.
Then, it would be better to have a step property with 0 by default (BoundedNumericProperty(0, min=0)), and take use the step method if it's > 0 only. :)

Also, check how to mark the property with a ".. versionadded:: 1.4.0". (grep in the current source code)

Thanks you!

@ghost ghost assigned tito Aug 2, 2012

@@ -95,7 +104,11 @@ def get_norm_value(self):
def set_norm_value(self, value):
vmin = self.min
- self.value = value * (self.max - vmin) + vmin
+ val = value * (self.max - vmin) + vmin

This comment has been minimized.

Show comment Hide comment
@aspidites

aspidites Aug 4, 2012

Contributor

You can use the previously defined d here instead of (self.max - vmin)

@aspidites

aspidites Aug 4, 2012

Contributor

You can use the previously defined d here instead of (self.max - vmin)

This comment has been minimized.

Show comment Hide comment
@legikaloz

legikaloz Aug 15, 2012

Contributor

The variable "d" is in another function (get_norm_value) or I miss something?

@legikaloz

legikaloz Aug 15, 2012

Contributor

The variable "d" is in another function (get_norm_value) or I miss something?

akshayaurora added some commits Aug 5, 2012

Loader: fix path for image-missing on windows and close file before
calling unlink in case of file not found or similar error
Atlas: fix path conversion for windows
@aspidites

This comment has been minimized.

Show comment Hide comment
@aspidites

aspidites Aug 6, 2012

Contributor

actually, you can do this on line 168:

filename = self._filename.relace('/', os.sep)
Contributor

aspidites commented on kivy/atlas.py in 63d25db Aug 6, 2012

actually, you can do this on line 168:

filename = self._filename.relace('/', os.sep)
@legikaloz

This comment has been minimized.

Show comment Hide comment
@legikaloz

legikaloz Aug 6, 2012

Contributor

Ok thanks, I will change the code as suggested. The variable "d" referenced by aspidites is in another function (get_norm_value) or I miss something?

Contributor

legikaloz commented Aug 6, 2012

Ok thanks, I will change the code as suggested. The variable "d" referenced by aspidites is in another function (get_norm_value) or I miss something?

tito and others added some commits Aug 6, 2012

Merge pull request #606 from kivy/atlas_texture_region
Atlas: pass CoreImage instead of just TextureRegion
scrollview: avoid all the touch outside the view. Because the drawing…
… is outside the view is removed, it make no sense to dispatch touch. We was actually having an issue cause of that with the filebrowser: touching outside the view on a possible element was catched and used by the filebrowser.
Merge branch 'master' of github.com:kivy/kivy
Conflicts:
	examples/demo/showcase/showcase.kv
Merge pull request #613 from esbullington/spinner_mod
Modified spinner to close on (re-)click
Merge pull request #614 from kivy/screen_addwidg
UIX:ScreenManager: ensure screen is orphaned before before adding it to
+
+ .. versionadded:: 1.4.0
+
+ :data:`step` is a :class:`~kivy.properties.NumericProperty`, default to

This comment has been minimized.

Show comment Hide comment
@rubik

rubik Aug 15, 2012

Actually it's a BoundedNumericProperty

@rubik

rubik Aug 15, 2012

Actually it's a BoundedNumericProperty

@legikaloz

This comment has been minimized.

Show comment Hide comment
@legikaloz

legikaloz Aug 23, 2012

Contributor

Hi Mathieu,

the modified code is acceptable in this form or should I create a new pull request?

Contributor

legikaloz commented Aug 23, 2012

Hi Mathieu,

the modified code is acceptable in this form or should I create a new pull request?

@tito tito merged commit 104be99 into kivy:master Sep 2, 2012

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