Skip to content

Commit

Permalink
Feature: Style improved
Browse files Browse the repository at this point in the history
  • Loading branch information
gamarcad committed Aug 2, 2021
1 parent cc7981f commit ef0a8d4
Show file tree
Hide file tree
Showing 11 changed files with 328 additions and 75 deletions.
11 changes: 8 additions & 3 deletions README.adoc → README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
= Guitare Theory Helper (GTH)
# Guitar Theory Helper (GTH)

GTH is lightweight, cross-platform and easy-to-use desktop application designed to help the comprehension of the
guitar theory, including gammas, chords but also degrees.

[link=https://github.com/gamarcad/gth/blob/master/images/gth-screenshot.png?raw=true]
![Alt Guitar Theory Helper](https://github.com/gamarcad/gth/blob/master/images/gth-screenshot.png?raw=true)

In practice, this application allows to:

Expand All @@ -13,7 +13,12 @@ In practice, this application allows to:

- Modify the desired gamma depending on a given degree.

== Contribution
## Installing from sources

It is possible to package GTH easily by using Maven, by taping `mvn package` in your terminal.
After that, launch the executable with `java -jar target/guitar-theory-helper-1.0-SNAPSHOT.jar`.

## Contribution

Please, notice that this application has been developed in few hours, so still under development.
To contribute, please refer to the `CONTRIBUTE.adoc` file.
Binary file modified images/gth-screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 41 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<maven.compiler.source>15</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<javafx.version>16</javafx.version>
<project.mainClass>main.Main</project.mainClass>
</properties>

<dependencies>
Expand All @@ -34,6 +35,25 @@
<artifactId>javafx-fxml</artifactId>
<version>${javafx.version}</version>
</dependency>

<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-graphics </artifactId>
<version>${javafx.version}</version>
<classifier>win</classifier>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-graphics </artifactId>
<version>${javafx.version}</version>
<classifier>linux</classifier>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-graphics </artifactId>
<version>${javafx.version}</version>
<classifier>mac</classifier>
</dependency>
</dependencies>

<build>
Expand All @@ -43,9 +63,29 @@
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.6</version>
<configuration>
<mainClass>view.Main</mainClass>
<mainClass>${project.mainClass}</mainClass>
</configuration>
</plugin>

<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>${project.mainClass}</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
13 changes: 0 additions & 13 deletions src/main/java/main.java

This file was deleted.

9 changes: 9 additions & 0 deletions src/main/java/main/Main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package main;

import view.GuitarTheoryHelperApplication;

public class Main {
public static void main(String[] args) {
GuitarTheoryHelperApplication.main(args);
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package view;

import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.Group;
import javafx.scene.control.ChoiceBox;
import javafx.scene.text.Text;
import model.*;
import view.converters.AccordStringConverter;
import view.converters.IntervalStringConverter;
Expand All @@ -11,9 +13,10 @@
import view.wrappers.GammaDescriptionGroupWrapper;
import view.wrappers.GuitarNeckGroupWrapper;

import java.net.URL;
import java.util.*;

public class MainController {
public class GTHController implements Initializable {
@FXML
private Group guitarGroup;

Expand All @@ -34,6 +37,22 @@ public class MainController {
private Group groupGammaDescription;


@FXML
private Text textChordsTitle;

@FXML
private Text textFundamental;

@FXML
private Text textInterval;

@FXML
private Text textMode;

@FXML
private Text textChord;


private GuitarNeckGroupWrapper guitarNeckGroupWrapper;
private GammaDescriptionGroupWrapper gammaDescriptionGroupWrapper;

Expand All @@ -44,8 +63,15 @@ public class MainController {
private Optional<AccordType> selectedAccordType;


@FXML
public void initialize() {
@Override
public void initialize(URL url, ResourceBundle resourceBundle) {
// initialize strings depending on the seleceted bundle
textChordsTitle.setText(resourceBundle.getString("nav.chords"));
textFundamental.setText(resourceBundle.getString("chords.fundamental"));
textInterval.setText(resourceBundle.getString("chords.interval"));
textMode.setText(resourceBundle.getString("chords.mode"));
textChord.setText(resourceBundle.getString("chords.chord"));

// initialize fundamental choice box
choiceBoxFundamental.getItems().addAll(Note.values());
choiceBoxFundamental.getSelectionModel().selectFirst();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,19 @@
import javafx.scene.image.Image;
import javafx.stage.Stage;

public class Main extends Application {
import java.util.Locale;
import java.util.ResourceBundle;

public class GuitarTheoryHelperApplication extends Application {

@Override
public void start(Stage primaryStage) throws Exception{
Parent root = FXMLLoader.load(getClass().getResource("/main.fxml"));
// get the local defined by the user
Locale locale = Locale.getDefault();
ResourceBundle bundle = ResourceBundle.getBundle("strings", locale);


Parent root = FXMLLoader.load(getClass().getResource("/main.fxml"), bundle);
root.getStylesheets().add("/global.css");
primaryStage.setTitle("Guitar Theory Helper");
primaryStage.getIcons().add(new Image("/gth-logo.png"));
Expand Down
15 changes: 15 additions & 0 deletions src/main/resources/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,19 @@
}
.text {
-fx-fill: rgb(.8, .8, .8);
}

.fundamentalChoiceBox {
-fx-background-color: #9701FF;
-fx-text-color: #ffff;


}

#leftPanel {
-fx-background-color: #9701FF;
}

#leftPanel text {
-fx-color: white;
}
Loading

0 comments on commit ef0a8d4

Please sign in to comment.