/*
 * PreferencesDialogConstants.java
 *
 * Copyright (C) 2024 by Posit Software, PBC
 *
 * Unless you have received this program directly from Posit Software pursuant
 * to the terms of a commercial license agreement with Posit Software, then
 * this program is licensed to you under the terms of version 3 of the
 * GNU Affero General Public License. This program is distributed WITHOUT
 * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
 * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
 *
 */
package org.rstudio.studio.client.workbench.prefs.views;

//
// This class exists primarily to make changes to the preference dialog's
// dimensions more straightforward. A variety of sizes are still hardcoded
// in different dialogs, but where possible, those values should either be
// moved here, or computed based on existing values herein.
//
public class PreferencesDialogConstants
{
   public static final int PANEL_CONTAINER_WIDTH  = 640;
   public static final int PANEL_CONTAINER_HEIGHT = 600;
   public static final int SECTION_CHOOSER_WIDTH = 132;
   public static final int SECTION_CHOOSER_PADDING = 10;
   public static final int PANE_CONTAINER_WIDTH = PANEL_CONTAINER_WIDTH - SECTION_CHOOSER_WIDTH;

   // Width of the panel container when the section chooser is not shown, e.g.
   // Help / Accessibility / Acccessibility Options...
   public static final int PANEL_CONTAINER_WIDTH_NO_CHOOSER = 516;

   public static final String panelContainerWidth()
   {
      return PANEL_CONTAINER_WIDTH + "px";
   }
   
   public static final String panelContainerHeight()
   {
      return PANEL_CONTAINER_HEIGHT + "px";
   }
   
   public static final String panelContainerWidthNoChooser()
   {
      return PANEL_CONTAINER_WIDTH_NO_CHOOSER + "px";
   }

   // Project preferences dialog dimensions
   public static final int PROJECT_PANEL_CONTAINER_WIDTH  = 555;
   public static final int PROJECT_PANEL_CONTAINER_HEIGHT = 445;
   public static final int PROJECT_PANEL_CONTAINER_WIDTH_NO_CHOOSER =
         PROJECT_PANEL_CONTAINER_WIDTH - SECTION_CHOOSER_WIDTH + SECTION_CHOOSER_PADDING;

   public static final String projectPanelContainerWidth()
   {
      return PROJECT_PANEL_CONTAINER_WIDTH + "px";
   }

   public static final String projectPanelContainerHeight()
   {
      return PROJECT_PANEL_CONTAINER_HEIGHT + "px";
   }

   public static final String projectPanelContainerWidthNoChooser()
   {
      return PROJECT_PANEL_CONTAINER_WIDTH_NO_CHOOSER + "px";
   }
}
