Verified Commit afcc93d5 authored by Tijder's avatar Tijder

Improve windowed function

parent 71d041d4
Pipeline #216351 passed with stage
in 10 minutes and 28 seconds
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.0 -->
<!-- Generated with glade 3.38.0 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<!-- interface-css-provider-path plex.css -->
<template class="media_box_video_top" parent="GtkRevealer">
<property name="can_focus">False</property>
<property name="reveal_child">True</property>
<property name="can-focus">False</property>
<property name="reveal-child">True</property>
<child>
<!-- n-columns=3 n-rows=3 -->
<object class="GtkGrid">
<property name="height_request">50</property>
<property name="height-request">50</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<child>
<object class="GtkLabel" id="_title_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">10</property>
<property name="margin_right">10</property>
<property name="margin_top">5</property>
<property name="can-focus">False</property>
<property name="margin-left">10</property>
<property name="margin-right">10</property>
<property name="margin-top">5</property>
<property name="hexpand">True</property>
<property name="label">Title</property>
<property name="ellipsize">end</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="_subtitle_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">10</property>
<property name="margin_right">10</property>
<property name="margin_bottom">5</property>
<property name="can-focus">False</property>
<property name="margin-left">10</property>
<property name="margin-right">10</property>
<property name="margin-bottom">5</property>
<property name="label">subtitle</property>
<property name="ellipsize">end</property>
<attributes>
......@@ -41,47 +42,47 @@
</attributes>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="_close_button">
<property name="width_request">50</property>
<property name="height_request">50</property>
<property name="width-request">50</property>
<property name="height-request">50</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">media-playback-stop-symbolic</property>
<property name="can-focus">False</property>
<property name="icon-name">media-playback-stop-symbolic</property>
</object>
</child>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">0</property>
<property name="left-attach">2</property>
<property name="top-attach">0</property>
<property name="height">2</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<child>
<object class="GtkButton" id="_fullscreen_button">
<property name="width_request">50</property>
<property name="height_request">50</property>
<property name="width-request">50</property>
<property name="height-request">50</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">view-fullscreen-symbolic</property>
<property name="can-focus">False</property>
<property name="icon-name">view-fullscreen-symbolic</property>
</object>
</child>
</object>
......@@ -93,16 +94,16 @@
</child>
<child>
<object class="GtkButton" id="_fullscreen_windowed_button">
<property name="width_request">50</property>
<property name="height_request">50</property>
<property name="width-request">50</property>
<property name="height-request">50</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">video-display-symbolic</property>
<property name="can-focus">False</property>
<property name="icon-name">video-display-symbolic</property>
</object>
</child>
</object>
......@@ -112,13 +113,25 @@
<property name="position">1</property>
</packing>
</child>
<style>
<class name="linked"/>
</style>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
<property name="height">2</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<style>
<class name="media_box"/>
</style>
......
......@@ -165,6 +165,8 @@ class PlayerView(Gtk.Box):
def __on_keypress(self, widget, key):
if key.keyval in [102, 65480]: # f and f11 key
self.__fullscreen()
elif key.string == 't':
self.__toggle_windowed()
elif key.keyval in [32, 112, 107]: # spacebar, p and k
self._player.play_pause()
elif key.string == 'o':
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment