Coder Social home page Coder Social logo

kivy-cupertino's Introduction

Welcome! ๐Ÿ‘‹

GitHub Stats

Who am I?

Currently, I'm a freshman in college pursuing computer engineering. I generally create projects that solve problems I am facing, such as a practice website for my high school Science Olympiad event in React or a tool to transfer data between Windows and iOS in Python. I've also written code for my high school Robotics team in Java and C# and have taught basic Python skills to team members.

Languages

Languages

Tools

Tools

kivy-cupertino's People

Contributors

arnavs-0 avatar cmdvmd avatar imgbotapp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

kivy-cupertino's Issues

[BUG] Adjust font size with CupertinoTabBar

As one increases the size of the CupertinoTabBar, the symbols get larger, but the font does not get larger. Is there a work around or can an additional variable be added to fix this?

I would like to work on dark mode

I'm working on a similar project (still in private) and the first problem I approached was dark mode.
I would like to contribute what I've already done to this project.
Do you already have something in mind? Could we talk on the kivy discord? I use the same username there.

[BUG] Unexpected Icon Button Behavior

Description

The icon button is showing a dark shadow on the click of the icon around the button.
image

Expected Behavior

Only the Icon should darken, not the space around it.

Example:

RPReplay_Final1617710107.mp4

Example App

Hello @cmdvmd, how are you doing?

I really like this amazing project, congrats!

Today I took a time to test widgets, and it's very cool.

I created a very simple example for testing widgets. Maybe you can use in documentation.

from functools import partial

from kivycupertino.app import CupertinoApp
from kivycupertino.uix.button import (
    CupertinoButton,
    CupertinoSystemButton,
)
from kivycupertino.uix.dialog import CupertinoAlertDialog, CupertinoActionSheet
from kivycupertino.uix.switch import CupertinoSwitch
from kivycupertino.uix.indicator import CupertinoProgressBar
from kivycupertino.uix.label import CupertinoLabel
from kivy.uix.floatlayout import FloatLayout


from kivy.core.window import Window

Window.clearcolor = 0.95, 0.95, 0.95, 1


class MyApp(CupertinoApp):
    def alert(self):
        def close(x, widget):
            self.fl.remove_widget(widget)

        alert = CupertinoAlertDialog()
        alert.title = 'Alert!'
        alert.content = 'Yes, this a alert!'
        alert.add_action('Action!', partial(close, widget=alert))
        self.fl.add_widget(alert)

    def action(self):
        def close(x, widget):
            self.fl.remove_widget(widget)

        action = CupertinoActionSheet()
        action.add_action('Close', partial(close, widget=action))
        self.fl.add_widget(action)

    def progress(self, op, widget):
        if op == '-':
            widget.value -= 10
        else:
            widget.value += 10

    def build(self):
        self.fl = FloatLayout()

        label = CupertinoLabel(text='Label')
        label.pos_hint = {'center_x': 0.5, 'center_y': 0.6}

        btn = CupertinoButton(text='Button')
        btn.size_hint = 0.8, 0.06
        btn.pos_hint = {'center_x': 0.5, 'center_y': 0.5}
        btn.on_release = self.alert

        sys_btn = CupertinoSystemButton(text='SystemButton')
        sys_btn.pos_hint = {'center_x': 0.5, 'center_y': 0.4}
        sys_btn.size_hint_y = 0.06
        sys_btn.on_release = self.action

        progress = CupertinoProgressBar()
        progress.size_hint = 0.8, 0.01
        progress.pos_hint = {'center_x': 0.5, 'center_y': 0.3}
        progress.value = 50

        progress_btn1 = CupertinoSystemButton(text='-')
        progress_btn1.size_hint = 0.1, 0.06
        progress_btn1.pos_hint = {'center_x': 0.25, 'center_y': 0.25}
        progress_btn1.on_release = partial(self.progress, '-', progress)

        progress_btn2 = CupertinoSystemButton(text='+')
        progress_btn2.size_hint = 0.1, 0.06
        progress_btn2.pos_hint = {'center_x': 0.75, 'center_y': 0.25}
        progress_btn2.on_release = partial(self.progress, '+', progress)

        switch = CupertinoSwitch()
        switch.size_hint = 0.1, 0.06
        switch.pos_hint = {'center_x': 0.5, 'center_y': 0.2}

        self.fl.add_widget(label)
        self.fl.add_widget(btn)
        self.fl.add_widget(sys_btn)
        self.fl.add_widget(progress)
        self.fl.add_widget(progress_btn1)
        self.fl.add_widget(progress_btn2)
        self.fl.add_widget(switch)

        return self.fl


MyApp().run()

To run I used s3 screen size

python main.py -m screen:s3,portrait

Full Window:

image

Alert:

image

Action:

image

Thanks a lot, and sorry about my English โค๏ธ

[BUG] Unable to add CupertinoSwipe(CupertinoLabel) to CupertinoScrollview

Description

I am trying to add a bunch of CupertinoSwipe(CupertinoLabel)'s to CupertinoScrollview and it fails to render.

Expected Behavior

Scrollview of Labels with Swipe function.

Example

        for _ in range(20):
            swipe = CupertinoSwipe()
            btn = CupertinoLabel(
                text='Test %s' % _,
                size_hint=(0.5, 0.5),
                pos_hint={"center": (0.5, 0.5)}
            )
            swipe_action = CupertinoSwipeAction()
            swipe.add_widget(swipe_action)
            swipe.add_widget(btn)
            layout.add_widget(btn)
        scroll_view = CupertinoScrollView(
            size_hint=(1, 1),
        )
        scroll_view.add_widget(layout)

Environment

MacOS 12.6 M1
Python 3.9.3
Kivy 2.2.0.dev0
kivy-cupertino cloned from GitHub(Sept 24, 2022)

Additional Information

Thank you all for all your work. This project is amazing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.