Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
jef committed Oct 15, 2020
2 parents 5979402 + 9048104 commit aa23235
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release_to_draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ jobs:
- name: "MacOS wgpu?"
if: ${{ matrix.os == 'macos' && matrix.gfx == 'wgpu' }}
run: make binary dmg
run: make binary dmg MACOS=1
- name: "MacOS OpenGL?"
if: ${{ matrix.os == 'macos' && matrix.gfx == 'opengl' }}
run: make binary dmg OPENGL=1
run: make binary dmg OPENGL=1 MACOS=1

- name: "Windows wgpu?"
if: ${{ matrix.os == 'windows' && matrix.gfx == 'wgpu' }}
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
The sections should follow the order `Packaging`, `Added`, `Changed`, `Fixed` and `Removed`.

## [Unreleased]
### Added
- It is now possible to open the addon website for more information by pressing the title in the catalog

## [0.4.1] - 2020-10-11
### Added
- 10 new themes has been bundled together with the application.
Expand Down
1 change: 1 addition & 0 deletions crates/core/src/catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ pub struct Catalog {
#[derive(Debug, Clone, Deserialize)]
pub struct CatalogAddon {
pub id: u32,
pub website_url: String,
pub name: String,
pub categories: Vec<String>,
pub summary: String,
Expand Down
9 changes: 7 additions & 2 deletions src/gui/element.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1329,6 +1329,7 @@ pub fn catalog_data_cell<'a, 'b>(
let mut row_containers = vec![];

let addon_data = &addon.addon;
let website_state = &mut addon.website_state;
let retail_install_state = &mut addon.retail_install_state;
let classic_install_state = &mut addon.classic_install_state;

Expand Down Expand Up @@ -1454,11 +1455,15 @@ pub fn catalog_data_cell<'a, 'b>(
.next()
{
let title = Text::new(&addon_data.name).size(DEFAULT_FONT_SIZE);
let title_container = Container::new(title)
let title_button: Element<Interaction> = Button::new(website_state, title)
.style(style::BrightTextButton(color_palette))
.on_press(Interaction::OpenLink(addon_data.website_url.clone()))
.into();

let title_container = Container::new(title_button.map(Message::Interaction))
.height(default_height)
.width(*width)
.center_y()
.padding(5)
.style(style::BrightForegroundContainer(color_palette));

row_containers.push((idx, title_container));
Expand Down
2 changes: 2 additions & 0 deletions src/gui/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1085,6 +1085,7 @@ impl Default for CatalogSearchState {
}

pub struct CatalogRow {
website_state: button::State,
retail_install_state: button::State,
classic_install_state: button::State,
addon: CatalogAddon,
Expand All @@ -1093,6 +1094,7 @@ pub struct CatalogRow {
impl From<CatalogAddon> for CatalogRow {
fn from(addon: CatalogAddon) -> Self {
Self {
website_state: Default::default(),
retail_install_state: Default::default(),
classic_install_state: Default::default(),
addon,
Expand Down

0 comments on commit aa23235

Please sign in to comment.