Skip to content

Commit

Permalink
Decrease main window minimum size (Fixes #5)
Browse files Browse the repository at this point in the history
Maybe fix notifications (#4)
  • Loading branch information
tkashkin committed Aug 7, 2022
1 parent 90f7433 commit 075092d
Show file tree
Hide file tree
Showing 9 changed files with 196 additions and 158 deletions.
54 changes: 54 additions & 0 deletions Adwaita/adw/controls/popup.styles
Original file line number Diff line number Diff line change
Expand Up @@ -284,5 +284,59 @@ popup.styles
{
textcolor="button_fg"
}

Notification
{
font-family=basefont
font-size=14
font-weight=400
bgcolor="popover_bg"
textcolor="popover_fg"
render_bg {}
render
{
0="fill(x0, y0, x1, y0+1, border)"
1="fill(x0, y1-1, x1, y1, border)"
2="fill(x0, y0+1, x0+1, y1-1, border)"
3="fill(x1-1, y0+1, x1, y1-1, border)"
}
}
"Notification Label"
{
font-family=basefont
font-size=14
font-weight=400
textcolor="popover_fg"
}

TooltipWindow
{
bgcolor="popover_bg"
render
{
0="fill(x0, y0, x1, y0+1, border)"
1="fill(x0, y1-1, x1, y1, border)"
2="fill(x0, y0+1, x0+1, y1-1, border)"
3="fill(x1-1, y0+1, x1, y1-1, border)"
}
}
"TooltipWindow Label"
{
padding-left=6
padding-right=6
font-family=basefont
font-size=14
font-weight=400
textcolor="popover_fg"
}
tooltip_headline
{
padding-left=6
padding-right=6
font-family=basefont
font-size=15
font-weight=700
textcolor="popover_fg"
}
}
}
162 changes: 64 additions & 98 deletions Adwaita/adw/rootdialog.styles
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ rootdialog.styles
{
CSteamRootDialog
{
minimum-width=1200
minimum-height=600
minimum-width=900
minimum-height=500
}

"CSteamRootDialog MenuBar"
Expand Down Expand Up @@ -152,94 +152,6 @@ rootdialog.styles
render_bg {}
}

ReloadButton
{
inset="0 0 0 0"
padding="3 0 0 0"
minimum-width=34
minimum-height=34
image="assets/icons/refresh_backdrop"
}
ReloadButton:framefocus
{
image="assets/icons/refresh"
}
ReloadButton:hover
{
render_bg
{
0="fill(x0+6, y0, x0+28, y0+34, button_hover_bg)"
1="fill(x0, y0+6, x0+6, y0+28, button_hover_bg)"
2="fill(x0+28, y0+6, x0+34, y0+28, button_hover_bg)"
3="image(x0, y0, x0+6, y0+6, assets/corners/6_w15/tl)"
4="image(x0+28, y0, x0+34, y0+6, assets/corners/6_w15/tr)"
5="image(x0, y0+28, x0+6, y0+34, assets/corners/6_w15/bl)"
6="image(x0+28, y0+28, x0+34, y0+34, assets/corners/6_w15/br)"
}
}
ReloadButton:active
{
render_bg
{
0="fill(x0+6, y0, x0+28, y0+34, button_active_bg)"
1="fill(x0, y0+6, x0+6, y0+28, button_active_bg)"
2="fill(x0+28, y0+6, x0+34, y0+28, button_active_bg)"
3="image(x0, y0, x0+6, y0+6, assets/corners/6_w30/tl)"
4="image(x0+28, y0, x0+34, y0+6, assets/corners/6_w30/tr)"
5="image(x0, y0+28, x0+6, y0+34, assets/corners/6_w30/bl)"
6="image(x0+28, y0+28, x0+34, y0+34, assets/corners/6_w30/br)"
}
}
ReloadButton:disabled
{
image="assets/icons/refresh_disabled"
render_bg {}
}

StopButton
{
inset="0 0 0 0"
padding="3 0 0 0"
minimum-width=34
minimum-height=34
image="assets/icons/stop_backdrop"
}
StopButton:framefocus
{
image="assets/icons/stop"
}
StopButton:hover
{
render_bg
{
0="fill(x0+6, y0, x0+28, y0+34, button_hover_bg)"
1="fill(x0, y0+6, x0+6, y0+28, button_hover_bg)"
2="fill(x0+28, y0+6, x0+34, y0+28, button_hover_bg)"
3="image(x0, y0, x0+6, y0+6, assets/corners/6_w15/tl)"
4="image(x0+28, y0, x0+34, y0+6, assets/corners/6_w15/tr)"
5="image(x0, y0+28, x0+6, y0+34, assets/corners/6_w15/bl)"
6="image(x0+28, y0+28, x0+34, y0+34, assets/corners/6_w15/br)"
}
}
StopButton:active
{
render_bg
{
0="fill(x0+6, y0, x0+28, y0+34, button_active_bg)"
1="fill(x0, y0+6, x0+6, y0+28, button_active_bg)"
2="fill(x0+28, y0+6, x0+34, y0+28, button_active_bg)"
3="image(x0, y0, x0+6, y0+6, assets/corners/6_w30/tl)"
4="image(x0+28, y0, x0+34, y0+6, assets/corners/6_w30/tr)"
5="image(x0, y0+28, x0+6, y0+34, assets/corners/6_w30/bl)"
6="image(x0+28, y0+28, x0+34, y0+34, assets/corners/6_w30/br)"
}
}
StopButton:disabled
{
image="assets/icons/stop_disabled"
render_bg {}
}

view_friends
{
padding-left=7
Expand Down Expand Up @@ -336,6 +248,7 @@ rootdialog.styles
padding-left=26
padding-right=8
padding-bottom=8
minimum-width=34
font-family=basefont
font-size=15
font-weight=700
Expand Down Expand Up @@ -386,26 +299,28 @@ rootdialog.styles
6="image(x1-6, y0+28, x1, y0+34, assets/corners/6_w30/br)"
}
}

// navigation icons
CUINavButtonNew
{
font-size=1
textcolor=none
render
{
0="image(x1+16, y0+9, x1+32, y0+25, assets/icons/store_backdrop)"
1="image(x1+140, y0+9, x1+156, y0+25, assets/icons/library_backdrop)"
2="image(x1+264, y0+9, x1+280, y0+25, assets/icons/community_backdrop)"
3="image(x1+388, y0+9, x1+404, y0+25, assets/icons/profile_backdrop)"
0="image(x1+10, y0+9, x1+26, y0+25, assets/icons/store_backdrop)"
1="image(x1+134, y0+9, x1+150, y0+25, assets/icons/library_backdrop)"
2="image(x1+258, y0+9, x1+274, y0+25, assets/icons/community_backdrop)"
3="image(x1+382, y0+9, x1+398, y0+25, assets/icons/profile_backdrop)"
}
}
CUINavButtonNew:framefocus
{
render
{
0="image(x1+16, y0+9, x1+32, y0+25, assets/icons/store)"
1="image(x1+140, y0+9, x1+156, y0+25, assets/icons/library)"
2="image(x1+264, y0+9, x1+280, y0+25, assets/icons/community)"
3="image(x1+388, y0+9, x1+404, y0+25, assets/icons/profile)"
0="image(x1+10, y0+9, x1+26, y0+25, assets/icons/store)"
1="image(x1+134, y0+9, x1+150, y0+25, assets/icons/library)"
2="image(x1+258, y0+9, x1+274, y0+25, assets/icons/community)"
3="image(x1+382, y0+9, x1+398, y0+25, assets/icons/profile)"
}
}

Expand All @@ -417,6 +332,13 @@ rootdialog.styles
shadowtextcolor="button_fg"
selectedtextcolor="accent_fg"
selectedbgcolor="accent_bg"
render_bg
{
0="fill(x0+6, y0, x1, y1, button_bg)"
1="fill(x0, y0+6, x0+6, y1-6, button_bg)"
2="image(x0, y0, x0+6, y0+6, assets/corners/6_w10/tl)"
3="image(x0, y1-6, x0+6, y1, assets/corners/6_w10/bl)"
}
}
"CSteamRootDialog URLBarSecure:framefocus"
{
Expand All @@ -435,6 +357,50 @@ rootdialog.styles
image="graphics/html_lock_disabled"
inset="0 0 0 0"
}

ReloadButton
{
inset="0 0 0 0"
padding="0 0 0 0"
image="assets/icons/refresh_backdrop"
render_bg
{
0="fill(x0, y0, x1-6, y1, button_bg)"
1="fill(x1-6, y0+6, x1, y1-6, button_bg)"
2="image(x1-6, y0, x1, y0+6, assets/corners/6_w10/tr)"
3="image(x1-6, y1-6, x1, y1, assets/corners/6_w10/br)"
}
}
ReloadButton:hover
{
image="assets/icons/refresh"
}
ReloadButton:disabled
{
image="assets/icons/refresh_disabled"
}

StopButton
{
inset="0 0 0 0"
padding="0 0 0 0"
image="assets/icons/stop_backdrop"
render_bg
{
0="fill(x0, y0, x1-6, y1, button_bg)"
1="fill(x1-6, y0+6, x1, y1-6, button_bg)"
2="image(x1-6, y0, x1, y0+6, assets/corners/6_w10/tr)"
3="image(x1-6, y1-6, x1, y1, assets/corners/6_w10/br)"
}
}
StopButton:hover
{
image="assets/icons/stop"
}
StopButton:disabled
{
image="assets/icons/stop_disabled"
}

WebPanelStyle
{
Expand Down
5 changes: 3 additions & 2 deletions Adwaita/resource/layout/steamrootdialog.layout
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ steamrootdialog.layout
place { control="frame_title" width=max height=48 }
place { control="UINavigatorPanel" width=max height=max }

place { control="InboxButton,view_friends,UIStatusPanel,MenuBar" width=34 height=34 y=7 margin-right=12 spacing=6 align=right end-right="frame_minimize" }
place { control="InboxButton,MenuBar" width=34 height=34 y=7 margin-right=12 spacing=6 align=right end-right="frame_minimize" }

place { control="AccountButton" width=28 height=28 y=10 margin-right=12 align=right end-right="InboxButton" }

place { control="frame_captiongrip" margin=2 width=max height=104 }

region { name="hidden" width=0 height=0 margin-left=-999 }
place { control="fullscreen,startvr,exitvr,add_game,AnnouncementButton,ParentalLockButton,universe_label,EOLAlert,SupportAlert" region="hidden" width=0 height=0 }
place { control="UIStatusPanel,view_friends,fullscreen,startvr,exitvr,add_game,AnnouncementButton,ParentalLockButton,universe_label,EOLAlert,SupportAlert" region="hidden" width=0 height=0 }
}
}
19 changes: 10 additions & 9 deletions Adwaita/resource/layout/uinavigatorpanel.layout
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@ uinavigatorpanel.layout
{
layout
{
region { name="left_buttons" x=0 y=7 width=250 height=34 }
place { control="label_console" region="left_buttons" x=7 y=0 width=34 height=42 }
place { control="back,forward,refresh,stop" region="left_buttons" start="label_console" x=7 y=0 width=34 height=34 spacing=6 }
region { name="left" x=0 y=7 width=166 height=34 }
region { name="tabs" margin-left=170 margin-right=170 }

place { control="label_store,label_library,label_community,label_me,label_news" spacing=4 margin-top=7 width=120 height=42 align=top-center }
place { control="label_community_new" y=7 width=0 height=34 align=right end-right="label_store" margin-right=6 } // tab icons
place { control="label_console" region="left" x=7 y=0 width=34 height=42 }
place { control="back,forward" region="left" start="label_console" x=7 y=0 width=34 height=34 spacing=6 }

place { control="label_store,label_library,label_community,label_me,label_news" region="tabs" spacing=4 margin-top=7 width=120 height=42 align=top-center }
place { control="label_community_new" region="tabs" y=7 width=0 height=34 align=right end-right="label_store" } // tab icons

place { control="label_community_friends,label_community_profile,label_community_gamehubs,label_community_forums,label_community_workshop,label_community_greenlight,label_community_marketplace" x=0 y=48 spacing=0 height=32 }

place { control="URLBar" width=600 height=30 margin-top=52 margin-left=16 margin-right=16 align=top-center }
place { control="URLBar" width=600 height=30 margin-top=52 margin-left=16 margin-right=46 align=top-center }
place { control="URLStatusImage" align=left start="URLBar" width=16 height=16 margin-left=-594 margin-top=7 }
place { control="PageLoadThrobber" align=left start="URLBar" width=16 height=16 margin-left=-24 margin-top=7 }

region { name="dropdown" width=200 x=82 y=80 height=20 }
place { control="PageLoadThrobber" align=left start="URLBar" width=16 height=16 margin-left=-594 margin-top=7 }
place { control="refresh,stop" align=left start="URLBar" width=30 height=30 }

place { control="URLAnchor" align=left y=48 height=38 width=max }
place { control="LibraryAnchor" height=38 width=max start="URLAnchor" dir=down }
Expand Down
4 changes: 3 additions & 1 deletion Adwaita/resource/menus/steam.menu
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ menubar
{
text=""

SkinVersion { text="Adwaita for Steam v0.1" shellcmd="steam://openurl/https://github.com/tkashkin/Adwaita-for-Steam" }
SkinVersion { text="Adwaita for Steam v0.2" shellcmd="steam://openurl/https://github.com/tkashkin/Adwaita-for-Steam" }

Divider {}

ViewFriends { text="#steam_menu_view_friends" shellcmd="steam://open/friends" }

StartVR { text="#steam_menu_startvr" command="startvr" }
ExitVR { text="#steam_menu_exitvr" command="exitvr" }
BigPicture { text="#steam_menu_bigpicturemode" shellcmd="steam://open/bigpicture" }
Expand Down
4 changes: 2 additions & 2 deletions install.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ def list_patches(patches: list[Path]) -> NoReturn:

def apply_patch(parentdir: Path, patch: Path):
with patch.open() as patch_file:
print(f"Applying patch {TEXT_BOLD}{patch_name(patch)}{TEXT_RESET}...")
print(f"\nApplying patch {TEXT_BOLD}{patch_name(patch)}{TEXT_RESET}...")
try:
subprocess.run(["patch", "-l", "-p0"], cwd = parentdir, stdin = patch_file)
except Exception as e:
print(f"Error applying patch: {e}")
print(f"\nError applying patch: {e}")

def install(source: Path, target: Path, name: str):
if target.is_dir():
Expand Down
Loading

0 comments on commit 075092d

Please sign in to comment.