Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
helgeerbe committed Jun 3, 2022
2 parents c6479e2 + b740d45 commit 111158a
Show file tree
Hide file tree
Showing 6 changed files with 148 additions and 72 deletions.
3 changes: 3 additions & 0 deletions picframe/config/configuration_example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ viewer:
show_text: "title caption name date folder location" # default="title caption name date folder location", show text, include combination of words: title, caption name, date, location, folder
text_justify: "L" # text justification L, C or R
text_bkg_hgt: 0.25 # default=0.25 (0.0-1.0), percentage of screen height for text background texture
text_opacity: 1.0 # default=1.0 (0.0-1.0), alpha value of text overlay
fit: False # default=False, True => scale image so all visible and leave 'gaps'
# False => crop image so no 'gaps'
kenburns: False # default=False, will set fit->False and blur_edges->False
Expand All @@ -38,9 +39,11 @@ viewer:
clock_justify: "R" # default="R", clock justification L, C, or R
clock_text_sz: 120 # default=120, clock character size
clock_format: "%I:%M" # default="%I:%M", strftime format for clock string
clock_opacity: 1.0 # default=1.0 (0.0-1.0), alpha value of clock overlay

menu_text_sz: 40 # default=40, menu character size
menu_autohide_tm: 10.0 # default=10.0, time in seconds to show menu before auto hiding (0 disables auto hiding)
geo_suppress_list: [] # default=None, substrings to remove from the location text

model:
pic_dir: "~/Pictures" # default="~/Pictures", root folder for images
Expand Down
7 changes: 5 additions & 2 deletions picframe/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def paused(self, val:bool):
self.__paused = val
pic = self.__model.get_current_pics()[0] # only refresh left text
self.__viewer.reset_name_tm(pic, val, side=0, pair=self.__model.get_current_pics()[1] is not None)
self.publish_state()

def next(self):
self.__next_tm = 0
Expand All @@ -83,7 +84,7 @@ def back(self):

def delete(self):
self.__model.delete_file()
self.back() # TODO check needed to avoid skipping one as record has been deleted from model.__file_list
self.next() # TODO check needed to avoid skipping one as record has been deleted from model.__file_list
self.__next_tm = 0

def set_show_text(self, txt_key=None, val="ON"):
Expand Down Expand Up @@ -154,6 +155,7 @@ def display_is_on(self):
def display_is_on(self, on_off):
self.paused = not on_off
self.__viewer.display_is_on = on_off
self.publish_state()

@property
def clock_is_on(self):
Expand All @@ -172,6 +174,7 @@ def shuffle(self, val:bool):
self.__model.shuffle = val
self.__model.force_reload()
self.__next_tm = 0
self.publish_state()

@property
def fade_time(self):
Expand Down Expand Up @@ -202,7 +205,7 @@ def brightness(self):
@brightness.setter
def brightness(self, val):
self.__viewer.set_brightness(float(val))
self.__next_tm = 0
self.publish_state()

@property
def matting_images(self):
Expand Down
Loading

0 comments on commit 111158a

Please sign in to comment.