Jump to content


Photo

VolumeText


  • Please log in to reply
8 replies to this topic

#1 mrvica

  • Senior Member
  • 1,227 posts

+82
Good

Posted 27 July 2018 - 21:14

some people like VolumeText on the VolumeBar, this can be achieved by an externel render (VolumeText.py) or directly patching /Screens/Volume.py, patch by vali
from Screen import Screen
from Components.VolumeBar import VolumeBar
from Components.Label import Label #NEW LINE

class Volume(Screen):
	def __init__(self, session):
		Screen.__init__(self, session)

		self.volumeBar = VolumeBar()

		self["Volume"] = self.volumeBar
		self["VolumeText"] = Label("") #NEW LINE

	def setValue(self, vol):
		print "setValue", vol
		self.volumeBar.setValue(vol)
		self["VolumeText"].setText(str(vol)) #NEW LINE

now only a widget is needed in your skin.xml, i.e for a fullhd skin, here volume screen without using any pixmaps (!)

<screen name="Volume" position="center,60" size="773,39" title="Volume" backgroundColor="#ff000000" zPosition="10" flags="wfNoBorder">
    <widget name="Volume" position="0,14" size="681,12" foregroundColor="#2397db" backgroundColor="#ff9c00" />
    <widget name="VolumeText" font="Regular;33" transparent="1" foregroundColor="#ff9c00" borderWidth="3" halign="center" position="698,2" size="75,36" />
</screen>

 



Re: VolumeText #2 mrvica

  • Senior Member
  • 1,227 posts

+82
Good

Posted 22 August 2018 - 14:24

push
no need for a render, doesn´t brake anything, just two more lines to Screens/Volume.py

Re: VolumeText #3 littlesat

  • PLi® Core member
  • 56,271 posts

+691
Excellent

Posted 22 August 2018 - 15:52

Can you offer a merge request?


WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: VolumeText #4 ims

  • PLi® Core member
  • 13,624 posts

+212
Excellent

Posted 22 August 2018 - 16:05

and if some people not like it ? What then ?


Edited by ims, 22 August 2018 - 16:07.

Kdo nic nedělá, nic nezkazí!

Re: VolumeText #5 mrvica

  • Senior Member
  • 1,227 posts

+82
Good

Posted 22 August 2018 - 16:28

you get VolumeText if you first activate it in the skin (example above), if not, no any will be shown, it does no harm to anything

Re: VolumeText #6 Persian Prince

  • Senior Member
  • 1,982 posts

+247
Excellent

Posted 22 August 2018 - 16:33

Can you offer a merge request?

 

Done: https://github.com/O...igma2/pull/1685

 

:)


Open Vision sources: https://github.com/OpenVisionE2


Re: VolumeText #7 Persian Prince

  • Senior Member
  • 1,982 posts

+247
Excellent

Posted 22 August 2018 - 16:47

This one is with empty lines removed: https://github.com/O...igma2/pull/1686
 
Choose what you want to merge :)

Open Vision sources: https://github.com/OpenVisionE2


Re: VolumeText #8 Erik Slagter

  • PLi® Core member
  • 46,951 posts

+541
Excellent

Posted 31 August 2018 - 18:04

PP: if the empty lines where there already, leave them. If they were introduced by your patch, remove them in the patch. I was under the impression we already discussed this.


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: VolumeText #9 mrvica

  • Senior Member
  • 1,227 posts

+82
Good

Posted 23 March 2019 - 17:31

ok, it is been since summer in GIT, for FullNightHD would look like this

<screen name="Volume" title="Volume" position="0,330" size="30,360" backgroundColor="transpBlack" zPosition="1" flags="wfNoBorder">
		<widget name="Volume" pixmap="PLi-FullNightHD/infobar/volumeslider.png" position="0,3" size="30,300" orientation="orBottomToTop" transparent="1" zPosition="1"/>
		<ePixmap pixmap="PLi-FullNightHD/infobar/vol_box.png" position="0,333" size="30,24" alphatest="on" zPosition="4"/>
		<widget name="VolumeText" font="Regular;17" backgroundColor="transpBlack" halign="center" position="0,310" size="30,18" />
	</screen>

Attached Files




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users