Skip to content

Commit

Permalink
4.1 Added Update Checker, fixes for shelves and Vertical Nav Bar erro…
Browse files Browse the repository at this point in the history
…r, GUI Hyperlinks, Crisp Cut Theme
  • Loading branch information
Jonius7 committed Dec 18, 2020
1 parent d2f1f54 commit b6235e5
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 32 deletions.
Binary file added images/crisp_cut.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 5 additions & 2 deletions libraryroot.custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
--WhatsNewOrder: 2; /* Default: 0. Set 0 to put to top, 1 or higher to put to bottom */

/* Left Sidebar - Games List */
--HoverOverlayPosition: unset; /* Default: 0. Set 0 if default JS, unset if tweaked JS */
--HoverOverlayPosition: 0; /* Default: 0. Set 0 if default JS, unset if tweaked JS */
--GameListEntrySize: 16px; /* Default: 16px. */
--CategoryNameHeaderSize: 13px; /* Default: 13px. */
--GameListZoomSize: 75%; /* Default: 100%. 75% highly recommended for Game List similar to old Library UI. Affects GameListEntrySize and CategoryNameHeaderSize */
Expand Down Expand Up @@ -472,11 +472,14 @@ div.appdetailsoverview_Container_27RcN.appdetailsoverview_Glassy_2OOzY>div.appde

/* Game AppPage Activity - Friends
========================================================================== */

/* Compact News */
/* Remove Activity item margin */

.appactivityday_AppActivityDay_S2Fu9 {
margin-bottom: 0px;
margin-top: -29px;
min-height: 47px;
}

.appdetailssection_AppDetailsSectionContainer_31ptF.appdetailssection_AppDetailsSectionHasLabel_2G5B7 > div > div:nth-child(2) {
Expand Down Expand Up @@ -574,7 +577,7 @@ div.appdetailsoverview_Container_27RcN.appdetailsoverview_Glassy_2OOzY>div.appde
}

/* margin bottom for trading card activity */
.appactivityday_Event_UVeN0 .appactivityday_EventBody_NEMXh {
.appactivityday_TradingCardSection_2IS7Z {
margin-bottom: 12px;
}

Expand Down
45 changes: 30 additions & 15 deletions old_glory.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

class OldGloryApp(tk.Tk):
def __init__(self, *args, **kwargs):
self.version = "v0.9.5.1 Beta"
self.version = "v0.9.5.2 Beta"
self.release = "4.1"

### Window, Title, Icon setup
Expand All @@ -39,8 +39,7 @@ def __init__(self, *args, **kwargs):
self.maxsize(width=screen_width, height=screen_height)
container.pack(side="top", fill="both", expand = True)

if OS_TYPE == "Windows":
self.iconbitmap(resource_path('steam_oldglory.ico'))
add_window_icon(self)
self.wm_title("SteamUI-OldGlory Configurer")

### Default Font
Expand Down Expand Up @@ -649,7 +648,7 @@ def dropdown_click(event, page):
#change_image
change_image(page.image1, theme_image_path)
else:
change_image(page.image1, resource_path("images/no_preview.png"))
change_image(page.image1, resource_path("images/crisp_cut.png"))

### INSTALL Functions
### ================================
Expand Down Expand Up @@ -840,20 +839,24 @@ def reload_click(event, controller):
### Image Functions
### ================================
def open_img(filename, width=350):
x = filename
img = Image.open(x)
new_width = width
new_height = int(new_width * img.height / img.width)
img = img.resize((new_width, new_height), Image.ANTIALIAS)
img = ImageTk.PhotoImage(img)
return img
try:
x = filename
img = Image.open(x)
new_width = width
new_height = int(new_width * img.height / img.width)
img = img.resize((new_width, new_height), Image.ANTIALIAS)
img = ImageTk.PhotoImage(img)
return img
except:
print("Unable to add image: " + filename, file=sys.stderr)
print(traceback.print_exc(), file=sys.stderr)

def add_img(frame, filename, width=350):
img = open_img(filename, width)
panel = tk.Label(frame, image=img)
panel.image = img
return panel

return panel
def change_image(label, filename):
img = open_img(filename)
label.configure(image=img)
Expand Down Expand Up @@ -1307,8 +1310,7 @@ def settings_window(event, controller):
settings.geometry(f'{windowW}x{windowH}+{int(windowX)}+{int(windowY)}')
settings.wm_title("Settings and About")

if OS_TYPE == "Windows":
settings.iconbitmap(resource_path('steam_oldglory.ico'))
add_window_icon(settings)

settings.tkraise(controller)

Expand Down Expand Up @@ -1418,6 +1420,19 @@ def settings_window(event, controller):

### ================================

def add_window_icon(window):
icon_filename = 'steam_oldglory.ico'
try:
if OS_TYPE == "Windows":
window.iconbitmap(resource_path(icon_filename))
elif OS_TYPE == "Linux":
icon = PhotoImage(file=icon_filename)
root.tk.call('wm', 'iconphoto', root._w, icon)
except:
print("Failed to load icon: " + icon_filename, file=sys.stderr)
print(traceback.print_exc(), file=sys.stderr)


def resource_path(relative_path):
""" Get absolute path to resource, works for dev and for PyInstaller """
try:
Expand Down
2 changes: 1 addition & 1 deletion themes/config.css.original
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
/**************/
/* GAME ICONS */
/**************/
--GameIcons: none; /* Set to [ none | block ] */
--GameIcons: block; /* Set to [ none | block ] */


/**********************/
Expand Down
57 changes: 43 additions & 14 deletions themes/crispcut.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
:root {
--SectionHeaderColor: #dddddd;
--LightSectionColor1: #dddddd;
--LightSectionColor2: #8a8a8a;
--SectionFontColor1: #1d1d1d;
--SectionFontColor2: #0c0c0f;
--LinksFontColor: #0d0d0d;
Expand All @@ -9,12 +10,12 @@
/* full background color */
.appdetails_Glassy_3Fmxx.appdetails_ScrollContainer_2l416 {
/*background-image: radial-gradient(100% 100% at 45% 35%, #095aef 0%, #151616 100%);*/
background-image: radial-gradient(100% 100% at top left, #e7ebf1 0%, #151616 100%);
background-image: radial-gradient(100% 100% at top left, rgba(231,235,241,0.2) 0%, rgba(160,162,168,0.4) 10%, rgba(21, 22, 22, 1) 100%);
}

/* background glass */
.appdetailsoverview_Glassy_2OOzY .appdetailsoverview_Backdrop_1Qa-A {
background: linear-gradient(180deg, rgba(40, 41, 49, 0.2) 0%, rgba(22,22,22, 1) 10%, rgba(0,0,0,1) 95%, rgba(22,22,23,0) 100%);
background: linear-gradient(180deg, rgba(40, 41, 49, 0.2) 0%, rgba(22,22,22, 0.7) 10%, rgba(33,33,35,0.7) 92%, rgba(22,22,23,0) 100%);
}

.appdetailsoverview_Glassy_2OOzY .appdetailsoverview_BackdropGlass_Jbe-- {
Expand Down Expand Up @@ -42,15 +43,15 @@
}

.appdetailssectionheader_Label_1SQ30 {
color: var(--SectionHeaderColor) !important;
color: var(--LightSectionColor1) !important;
}

.appdetailssectionheader_Label_1SQ30 * {
color: var(--SectionHeaderColor) !important;
color: var(--LightSectionColor1) !important;
}

div.appactivityday_AppActivityDay_S2Fu9 .appactivityday_AppActivityDate_19LfM {
color: var(--SectionHeaderColor) !important;
color: var(--LightSectionColor1) !important;
}

/* Workshop */
Expand All @@ -60,16 +61,16 @@ div.appactivityday_AppActivityDay_S2Fu9 .appactivityday_AppActivityDate_19LfM {
}

button.DialogButton._DialogLayout.Secondary.appdetailsworkshopsection_SpacedButton_36eP4 {
color: var(--SectionHeaderColor) !important;
color: var(--LightSectionColor1) !important;
}

.appdetailsworkshopsection_ButtonContainer_2LXfs * {
color: var(--SectionHeaderColor) !important;
color: var(--LightSectionColor1) !important;
}

/* Event */

.appactivityday_PartnerEvent_1AYE1 {
.appactivityday_PartnerEvent_1AYE1, .appactivityday_PartnerEventLargeImage_Container_Libri {
background: radial-gradient(100% 100% at top left, rgba(240,240,240,0.8) 50%, rgba(120,120,120,0.8) 100%);
box-shadow: 6px 6px 2px #101010ee;
border: 0;
Expand All @@ -90,10 +91,19 @@ button.DialogButton._DialogLayout.Secondary.appdetailsworkshopsection_SpacedButt
}

.comment_thread_RatingBar_1yWgP * {
color: var(--SectionHeaderColor) !important;
fill: var(--SectionHeaderColor) !important;
color: var(--LightSectionColor1) !important;
fill: var(--LightSectionColor1) !important;
}

.appactivityday_EventHeadline_QCKBq * {
color: var(--LightSectionColor2) !important;
}

.appactivityday_ActorName_1t1iy > .personanameandstatus_playerName_nOdcT {
color: var(--LightSectionColor1) !important;
}



/* Play bar */
.appdetailsplaysection_Container_3Yf8b.appdetailsplaysection_InPage_1U7LK {
Expand All @@ -103,16 +113,30 @@ button.DialogButton._DialogLayout.Secondary.appdetailsworkshopsection_SpacedButt

/* Navigation bar */

.appdetailssection_AppDetailsSection_2r4TK.appdetailsprimarylinkssection_LinksSection_3-V8v > div {
margin: 0px 0px 8px 0px;
}

.appdetailsprimarylinkssection_LinksSection_3-V8v .appdetailsprimarylinkssection_LinksSectionBody_25f0f {
padding: 0px 26px 3px 20px !important;
}

.appdetailsprimarylinkssection_LinksSection_3-V8v {
padding-left: 0px;
padding-right: 0px;
}


.appdetailssection_Body_5uvIN.appdetailsprimarylinkssection_LinksSectionBody_25f0f {
/*background: radial-gradient(100% 100% at top left, rgba(240,240,240,0.4) 50%, rgba(120,120,120,0.2) 100%);*/
background: radial-gradient(100% 100% at top left, rgba(95,125,130,0.8) 0%, rgba(15,38,80,0.8) 95%);
background: radial-gradient(100% 100% at top left, rgba(15,38,80,0.8) 88%, rgba(10,33,75,0.8) 98%);
/*background-image: radial-gradient(100% 100% at top left, #e7ebf1 0%, #151616 100%);*/
box-shadow: 6px 6px 2px #101010ee;

}

.appdetailssection_Body_5uvIN.appdetailsprimarylinkssection_LinksSectionBody_25f0f * {
color: #f0fcff;
color: var(--LightSectionColor1);
}

/* Achievements */
Expand All @@ -122,5 +146,10 @@ button.DialogButton._DialogLayout.Secondary.appdetailsworkshopsection_SpacedButt
}

.appdetailsachievementssection_AdditionalItem_2aVnD.appdetailsachievementssection_RemainderContainer_lZ2c4 * {
color: var(--SectionHeaderColor) !important;
color: var(--LightSectionColor1) !important;
}

/* Hover */
button.DialogButton.appdetailsbutton_AppDetailsButton_3Cdin.appdetailsbutton_BottomRight_3nJyY:hover {
background-color: rgba(151, 163, 178, 0.358);
}

0 comments on commit b6235e5

Please sign in to comment.