コード例 #1
0
from dtk.ui.theme import Theme, ui_theme
from dtk.ui.skin_config import skin_config
import os
from deepin_utils.file import get_parent_dir
from constant import FULL_DEFAULT_WIDTH, FULL_DEFAULT_HEIGHT, PROGRAM_VERSION

# Init skin config.
skin_config.init_skin(
    "sky",
    os.path.join(get_parent_dir(__file__, 3), "skin"),
    os.path.expanduser("~/.config/deepin-music-player/skin"),
    os.path.expanduser("~/.config/deepin-music-player/skin_config.ini"),
    "dmusic",
    PROGRAM_VERSION
    )

# Create application theme.
app_theme = Theme(
    os.path.join(get_parent_dir(__file__, 3), "app_theme"),
    os.path.expanduser("~/.config/deepin-music-player/theme")
    )

# Set theme.
skin_config.load_themes(ui_theme, app_theme)
skin_config.set_application_window_size(FULL_DEFAULT_WIDTH, FULL_DEFAULT_HEIGHT)

コード例 #2
0
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>

# Import skin and theme, those must before at any other modules.
# from skin import ui_theme, app_theme
from dtk.ui.skin_config import skin_config
from dtk.ui.theme import Theme, ui_theme
from deepin_utils.file import get_parent_dir
import os

# Init skin config.
skin_config.init_skin(
    "blue",
    os.path.join(get_parent_dir(__file__, 2), "skin"),
    os.path.expanduser("~/.config/deepin-software-center/skin"),
    os.path.expanduser("~/.config/deepin-software-center/skin_config.ini"),
    "deepin-software-center",
    "3.0"
    )

# Create application theme.
app_theme = Theme(
    os.path.join(get_parent_dir(__file__, 2), "app_theme"),
    os.path.expanduser("~/.config/deepin-software-center/theme")
    )

# Set theme.
skin_config.load_themes(ui_theme, app_theme)
コード例 #3
0
# 
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from dtk.ui.theme import Theme, ui_theme
from dtk.ui.skin_config import skin_config
import os
from dtk.ui.utils import get_parent_dir

from xdg_support import get_sub_config_dir

# Init skin config.
skin_config.init_skin(
    "blue",
    os.path.join(get_parent_dir(__file__, 3), "skin"),
    os.path.expanduser("~/.config/deepin-music-player/skin"),
    os.path.expanduser("~/.config/deepin-music-player/skin_config.ini"),
    "ghi",
    "1.0"
    )

# Create application theme.
app_theme = Theme(
    os.path.join(get_parent_dir(__file__, 3), "app_theme"),
    get_sub_config_dir("theme")    
    )

# Set theme.
skin_config.load_themes(ui_theme, app_theme)
skin_config.set_application_window_size(290, 600)
コード例 #4
0
from dtk.ui.skin_config import skin_config
from dtk.ui.theme import Theme, ui_theme
import os
from dtk.ui.utils import get_parent_dir

# Init skin config.
skin_config.init_skin(
    "blue",
    os.path.join(get_parent_dir(__file__, 3), "skin"),
    os.path.expanduser("~/.config/worklist/skin"),
    os.path.expanduser("~/.config/worklist/skin_config.ini"),
    "worklist",
    "1.0"
    )

# Create application theme.
app_theme = Theme(
    os.path.join(get_parent_dir(__file__, 3), "theme"),
    os.path.expanduser("~/.config/worklist/theme")
    )


# Set theme.
skin_config.load_themes(ui_theme, app_theme)
skin_config.set_application_window_size(300, 500)
コード例 #5
0
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>

# Import skin and theme, those must before at any other modules.
# from skin import ui_theme, app_theme
from dtk.ui.skin_config import skin_config
from dtk.ui.theme import Theme, ui_theme
from deepin_utils.file import get_parent_dir
import os

# Init skin config.
skin_config.init_skin(
    "blue",
    os.path.join(get_parent_dir(__file__, 2), "skin"),
    os.path.expanduser("~/.config/deepin-software-center/skin"),
    os.path.expanduser("~/.config/deepin-software-center/skin_config.ini"),
    "deepin-software-center",
    "3.0"
    )

# Create application theme.
app_theme = Theme(
    os.path.join(get_parent_dir(__file__, 2), "app_theme"),
    os.path.expanduser("~/.config/deepin-software-center/theme")
    )

# Set theme.
skin_config.load_themes(ui_theme, app_theme)
コード例 #6
0
ファイル: demo.py プロジェクト: netphi/deepin-ui
# 
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

# Import skin and theme, those must before at any other modules.
# from skin import ui_theme, app_theme
from dtk.ui.skin_config import skin_config
from dtk.ui.theme import Theme, ui_theme
from dtk.ui.utils import get_parent_dir
import os

# Init skin config.
skin_config.init_skin(
    "01",
    os.path.join(get_parent_dir(__file__), "skin"),
    os.path.expanduser("~/.config/deepin-ui-demo/skin"),
    os.path.expanduser("~/.config/deepin-ui-demo/skin_config.ini"),
    "deepin-ui-demo",
    "1.0"
    )

# Create application theme.
app_theme = Theme(
    os.path.join(get_parent_dir(__file__), "app_theme"),
    os.path.expanduser("~/.config/deepin-ui-demo/theme")
    )

# Set theme.
skin_config.load_themes(ui_theme, app_theme)

# Load other modules.
from dtk.ui.application import Application