Documentation
¶
Index ¶
Constants ¶
const ChannelsWidth = bannerWidth
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Banner ¶
type Banner struct { *gtk.Overlay Shadows *gtk.Box Picture *onlineimage.Picture // contains filtered or unexported fields }
Banner is the guild banner display on top of the channel view.
func (*Banner) Invalidate ¶
func (b *Banner) Invalidate()
Invalidate invalidates and updates the Banner image.
func (*Banner) SetScrollOpacity ¶
SetScrollOpacity sets the opacity of the shadow depending on the scroll level. If the scroll goes past the banner, then scrolled is true.
type ChannelIcon ¶ added in v0.0.25
type ChannelIcon struct { *gtk.Widget Icon *gtk.Image }
ChannelIcon is a widget that displays a channel's icon. This does not handle DM channels, as it does not display avatars. It is only for displaying the channel icon.
func NewChannelIcon ¶ added in v0.0.25
func NewChannelIcon(ch *discord.Channel, overrides ...ChannelIconOverrideFunc) *ChannelIcon
NewChannelIcon creates a new ChannelIcon. If ch is nil, the icon will be a special unknown icon.
type ChannelIconOverrideFunc ¶ added in v0.0.25
type ChannelIconOverrideFunc func(t discord.ChannelType) (string, bool)
type View ¶
type View struct { *adw.ToolbarView HeaderView *gtk.Overlay HeaderBar *adw.HeaderBar GuildName *gtk.Label Banner *Banner Scroll *gtk.ScrolledWindow ChannelList *gtk.ListView // contains filtered or unexported fields }
View holds the entire channel sidebar containing all the categories, channels and threads.
func (*View) InvalidateHeader ¶
func (v *View) InvalidateHeader()
InvalidateHeader invalidates the guild name and banner.