From ff6854d097cb8a17c6eb305cb04fb21f2fc6a859 Mon Sep 17 00:00:00 2001 From: Guerric Chupin <guerric.chupin@gmail.com> Date: Mon, 12 Sep 2016 21:10:22 +0100 Subject: [PATCH] LayerSettings changed. --- src/RMCA/GUI/LayerSettings.hs | 24 +++++++++++++++--------- src/RMCA/GUI/MainSettings.hs | 4 ++-- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/RMCA/GUI/LayerSettings.hs b/src/RMCA/GUI/LayerSettings.hs index 626f90a..cca37da 100644 --- a/src/RMCA/GUI/LayerSettings.hs +++ b/src/RMCA/GUI/LayerSettings.hs @@ -2,14 +2,13 @@ module RMCA.GUI.LayerSettings where -import qualified Data.IntMap as M +import qualified Data.IntMap as M import Data.Maybe import Data.ReactiveValue import Data.String import Data.Tuple import Graphics.UI.Gtk import Graphics.UI.Gtk.Reactive -import Graphics.UI.Gtk.Reactive.ToggleButton import RMCA.Auxiliary import RMCA.GUI.NoteSettings import RMCA.Layer.LayerConf @@ -43,7 +42,9 @@ layerSettings = do -- GUI Boxes ------------------------------------------------------------------------------ layerSettingsVBox <- vBoxNew True 10 - layerSettingsBox <- hBoxNew True 10 + layerSettingsBox <- hBoxNew False 0 + centerSettings <- alignmentNew 0.5 0.5 0 0 + containerAdd layerSettingsBox centerSettings boxPackStart layerSettingsVBox layerSettingsBox PackNatural 0 @@ -70,7 +71,7 @@ layerSettings = do --labelSetAngle layBeatLabel 90 labelSetLineWrap layBeatLabel True let layBeatLabelRV = labelTextReactive layBeatLabel - boxPackStart layerSettingsBox layBeatBox PackNatural 0 + boxPackStart layerSettingsBox layBeatBox PackRepel 0 auxLayBeatBox <- vBoxNew False 0 boxPackEnd layBeatBox auxLayBeatBox PackRepel 0 boxPackStart auxLayBeatBox layBeatLabel PackRepel 0 @@ -78,9 +79,9 @@ layerSettings = do layVolumeAdj <- adjustmentNew 100 0 100 1 1 1 (layVolumeBox,layVolumeScale) <- mkVScale "Volume" layVolumeAdj - boxPackStart layerSettingsBox layVolumeBox PackNatural 0 + boxPackStart layerSettingsBox layVolumeBox PackRepel 0 (Requisition layVolW layVolH) <- widgetSizeRequest layVolumeScale - widgetSetSizeRequest layerSettingsBox layVolW (max layVolH 100) + widgetSetSizeRequest layerSettingsBox layVolW (max layVolH 75) scaleSetDigits layVolumeScale 0 {- layTempoAdj <- adjustmentNew 1 0 2 0.1 0.1 1 @@ -89,10 +90,15 @@ layerSettings = do -} strAdj <- adjustmentNew 0.8 0 2 0.1 0.1 0 (strBox, layStrengthScale) <- mkVScale "Strength" strAdj - boxPackStart layerSettingsBox strBox PackNatural 0 + boxPackStart layerSettingsBox strBox PackRepel 0 + + layerSettingsBox' <- hBoxNew False 10 + boxPackStart layerSettingsVBox layerSettingsBox' PackNatural 0 + centerSettings' <- alignmentNew 0 0.5 0 0 + containerAdd layerSettingsBox' centerSettings' bpbBox <- vBoxNew False 0 - boxPackStart layerSettingsBox bpbBox PackNatural 0 + boxPackStart layerSettingsBox' bpbBox PackRepel 0 bpbLabel <- labelNew (Just "Beat per bar") labelSetLineWrap bpbLabel True bpbAdj <- adjustmentNew 4 1 16 1 1 0 @@ -105,7 +111,7 @@ layerSettings = do boxPackStart auxBpbBox bpbButton PackGrow 0 repeatBox <- vBoxNew False 0 - boxPackStart layerSettingsBox repeatBox PackNatural 0 + boxPackStart layerSettingsBox' repeatBox PackRepel 0 repeatLabel <- labelNew (Just "Repeat count") labelSetLineWrap repeatLabel True repeatAdj <- adjustmentNew 0 0 100 1 1 0 diff --git a/src/RMCA/GUI/MainSettings.hs b/src/RMCA/GUI/MainSettings.hs index 4603517..acd1b8e 100644 --- a/src/RMCA/GUI/MainSettings.hs +++ b/src/RMCA/GUI/MainSettings.hs @@ -9,9 +9,9 @@ globalSettings = do globalSettingsBox <- vBoxNew False 10 tempoAdj <- adjustmentNew 120 40 200 1 1 1 tempoLabel <- labelNew (Just "Tempo") - boxPackStart globalSettingsBox tempoLabel PackNatural 0 + boxPackStart globalSettingsBox tempoLabel PackGrow 0 tempoScale <- hScaleNew tempoAdj - boxPackStart globalSettingsBox tempoScale PackNatural 0 + boxPackStart globalSettingsBox tempoScale PackGrow 0 scaleSetDigits tempoScale 0 let tempoRV = bijection (floor, fromIntegral) `liftRW` scaleValueReactive tempoScale -- 2.47.0