Adding a bezel to the wall in Web Interface#146
Conversation
| for (var j = 0; j < totalDisplaysPerScreen; j++) | ||
| div.append("<div class='bezel'></div>"); | ||
|
|
||
| $(".bezel").css("grid-column-gap", bezelWidth).css("grid-row-gap", bezelHeight).hide(); |
|
|
||
| var totalScreens = screenCountX * screenCountY; | ||
| var displayPerScreenVertical = bezelsVertical + 1; | ||
| var displayPerScreenHorizontal = bezelsHorizontal + 1; |
There was a problem hiding this comment.
maybe we could rename all "display" to "monitors" (plural) here to avoid any confusion with the X11 displays?
| xhr.send(null); | ||
| } | ||
|
|
||
| function showBezel() |
There was a problem hiding this comment.
showBezels (plural), applies to multiple places
| @@ -1,5 +1,5 @@ | |||
| <configuration> | |||
| <dimensions mullionHeight="12" fullscreen="1" numTilesWidth="2" screenHeight="1080" mullionWidth="14" screenWidth="3840" numTilesHeight="3"/> | |||
| <dimensions mullionHeight="12" fullscreen="1" numTilesWidth="2" screenHeight="1080" mullionWidth="14" screenWidth="3840" numTilesHeight="3" bezelsVertical="2" bezelsHorizontal="2"/> | |||
There was a problem hiding this comment.
I would really stick to bezelsPerScreenX / bezelsPerScreenY otherwise it looks like the total number of bezels.
Also, it would be better if the values in this configuration were meaningful, using bezelsPerScreenX=1, bezelsPerScreenY=0, and taking this opportunity to adjust screenWidth="3854" because if should normally include the mullionWidth to be correct
| const QString& getFilename() const; | ||
|
|
||
| /** Get the number of vertical bezels. */ | ||
| int getBezelsVertical() const; |
There was a problem hiding this comment.
The same remark applies here and everywhere in fact, I think it should be getBezelsPerScreenX as is it not a global count of bezels
| position: absolute; | ||
| width: 100%; | ||
| height: 100%; | ||
|
|
There was a problem hiding this comment.
you need a formatting tool also for css and javascript... ;-)
| CONFIG_EXPECTED_BEZELS_VERTICAL); | ||
|
|
||
| BOOST_CHECK_EQUAL(config.getBezelsHorizontal(), | ||
| CONFIG_EXPECTED_BEZELS_HORIZONAL); |
There was a problem hiding this comment.
Since the #define is used only here, and the other checks in this function do not use #defines, I would just use the values here for simplicty
05f6deb to
4354f26
Compare
| /** Get the filename passed to the constructor. */ | ||
| const QString& getFilename() const; | ||
|
|
||
| /** Get the number of horizonal bezels. */ |
| BOOST_CHECK_EQUAL(config.getFullscreen(), true); | ||
|
|
||
| BOOST_CHECK_EQUAL(config.getBezelsPerScreenY(), 1); | ||
| BOOST_CHECK_EQUAL(config.getBezelsPerScreenX(), 0); |
| getInt(query, _bezelsPerScreenY); | ||
|
|
||
| query.setQuery("string(/configuration/dimensions/@bezelsPerScreenX)"); | ||
| getInt(query, _bezelsPerScreenX); |
| return _bezelsPerScreenY; | ||
| } | ||
|
|
||
| int Configuration::getBezelsPerScreenX() const |
| bezelWidth=config["dimensions"]["bezelWidth"]; | ||
| bezelHeight=config["dimensions"]["bezelHeight"]; | ||
| bezelsPerScreenY=config["dimensions"]["bezelsPerScreenY"]; | ||
| bezelsPerScreenX=config["dimensions"]["bezelsPerScreenX"]; |
|
|
||
| var totalScreens = screenCountX * screenCountY; | ||
| var monitorsPerScreenY = bezelsPerScreenY + 1; | ||
| var monitorsPerScreenX = bezelsPerScreenX + 1; |
| {"bezelHeight", _config.getMullionHeight()}, | ||
| {"bezelWidth", _config.getMullionWidth()}, | ||
| {"bezelsPerScreenY", _config.getBezelsPerScreenY()}, | ||
| {"bezelsPerScreenX", _config.getBezelsPerScreenX()}}}, |
| div.append("<div class='bezel'></div>"); | ||
| } | ||
| $(".bezel").css("grid-column-gap", bezelWidth).css("grid-row-gap", bezelHeight).hide(); | ||
|
|
| var div = $("<div class=bezel > </div>"); | ||
| $("#wallOutline").append(div); | ||
| div.css("grid-template-columns", "repeat("+monitorsPerScreenY+", 1fr)"); | ||
| div.css("grid-template-rows", "repeat("+monitorsPerScreenX+ ", 1fr)"); |
No description provided.