Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Meal-Ordering App
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
emahmoud3
Meal-Ordering App
Commits
78289f35
Commit
78289f35
authored
4 years ago
by
emahmoud3
Browse files
Options
Downloads
Patches
Plain Diff
connected the displayed price to the slider.
parent
d68496b0
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
main.py
+3
-2
3 additions, 2 deletions
main.py
order.kv
+36
-0
36 additions, 0 deletions
order.kv
with
39 additions
and
2 deletions
main.py
+
3
−
2
View file @
78289f35
...
...
@@ -4,6 +4,8 @@ from kivy.core.window import Window # For inspection.
from
kivy.properties
import
NumericProperty
class
OrderApp
(
App
):
instance
=
NumericProperty
(
0
)
amount
=
NumericProperty
(
0
)
total
=
NumericProperty
(
0
)
# in cents
def
build
(
self
):
inspector
.
create_inspector
(
Window
,
self
)
# For inspection (press control-e to toggle).
...
...
@@ -11,7 +13,6 @@ class OrderApp(App):
self
.
total
=
round
(
self
.
root
.
ids
.
food
.
value
*
100
)
if
__name__
==
'
__main__
'
:
app
=
OrderApp
()
app
.
run
()
This diff is collapsed.
Click to expand it.
order.kv
+
36
−
0
View file @
78289f35
...
...
@@ -26,3 +26,39 @@ BoxLayout:
Label:
text: f' your total is ${app.total /100:.2f}.'
font_size: sp(24)
BoxLayout:
Label:
text: 'Switch to enter your order'
Switch:
id: switch
Label:
text: 'your order is done' if switch.active else 'Wait your order is still working'
ToggleButton:
text: 'Male'
group: 'Gender'
ToggleButton:
text: 'Female'
group: 'Gender'
status: 'Down'
Image:
source: 'Em.jpg'
size: self.texture_size
size_hint: (2,2)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment