Skip to content

kivy-code-quality-5 #2289

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

Open
wants to merge 8 commits into
base: v0.6
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions src/bitmessagekivy/baseclass/common.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# pylint: disable=no-name-in-module, attribute-defined-outside-init, import-error, unused-argument
# pylint: disable=no-init, too-few-public-methods

"""
All Common widgets of kivy are managed here.
"""
Expand Down Expand Up @@ -44,6 +46,32 @@
}


class ChipProperties():

Check notice on line 49 in src/bitmessagekivy/baseclass/common.py

View check run for this annotation

PyBitmessage Code Quality Checks / Code Quality - pylint

C1001 / old-style-class

Old-style class defined.
"""ChipProperties class for kivy UI"""
CENTER_X_ANDROID = 0.91
CENTER_X_OTHER = 0.94
CENTER_Y = 0.3
HEIGHT_DP = 18
RADIUS = [8]
TEXT_COLOR = (1, 1, 1, 1)
SIZE_HINT_ANDROID = (0.16, None)
SIZE_HINT_OTHER = (0.08, None)


class BadgeProperties():

Check notice on line 61 in src/bitmessagekivy/baseclass/common.py

View check run for this annotation

PyBitmessage Code Quality Checks / Code Quality - pylint

C1001 / old-style-class

Old-style class defined.
"""BadgeProperties class for kivy UI"""
SIZE_ANDROID = [120, 140]
SIZE_OTHER = [64, 80]
FONT_SIZE = "11sp"


DIALOG_WIDTH_ANDROID = 0.8
DIALOG_WIDTH_OTHER = 0.55
DIALOG_HEIGHT = 0.25
LONG_PRESS_DURATION = 1
DELETE_DELAY = 4


def load_image_path():
"""Return the path of kivy images"""
image_path = os.path.abspath(os.path.join('pybitmessage', 'images', 'kivy'))
Expand Down
Loading